This is an old version of the documentation. View the latest version here.
Control Surface  1.0.0
MIDI Control Surface library for Arduino
Public Member Functions | Private Attributes | List of all members
Incrementor< T, V > Class Template Reference

Utility class that acts as a functor to return incremental values. More...

#include <ArrayHelpers.hpp>

Collaboration diagram for Incrementor< T, V >:

Public Member Functions

 Incrementor (T start=0, V increment=1)
 
operator() ()
 

Private Attributes

value
 
const V increment
 

Detailed Description

template<class T, class V>
class Incrementor< T, V >

Utility class that acts as a functor to return incremental values.

Template Parameters
TThe type that will be returned by the functor, as well as the type of the initial value.
VThe type of the object that is added to the value on each call.

Definition at line 31 of file ArrayHelpers.hpp.

Constructor & Destructor Documentation

◆ Incrementor()

template<class T, class V>
Incrementor< T, V >::Incrementor ( start = 0,
increment = 1 
)
inline

Definition at line 33 of file ArrayHelpers.hpp.

Member Function Documentation

◆ operator()()

template<class T, class V>
T Incrementor< T, V >::operator() ( )
inline

Definition at line 35 of file ArrayHelpers.hpp.

Member Data Documentation

◆ value

template<class T, class V>
T Incrementor< T, V >::value
private

Definition at line 42 of file ArrayHelpers.hpp.

◆ increment

template<class T, class V>
const V Incrementor< T, V >::increment
private

Definition at line 43 of file ArrayHelpers.hpp.


The documentation for this class was generated from the following file: