Arduino Helpers master
Utility library for Arduino
Public Member Functions | Private Attributes | List of all members
Incrementor< T, V > Class Template Reference

#include <AH/Containers/ArrayHelpers.hpp>

Detailed Description

template<class T, class V>
class detail::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 28 of file 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
 

Constructor & Destructor Documentation

◆ Incrementor()

Incrementor ( start = 0,
increment = 1 
)
inline

Definition at line 30 of file ArrayHelpers.hpp.

Member Function Documentation

◆ operator()()

T operator() ( )
inline

Definition at line 32 of file ArrayHelpers.hpp.

Member Data Documentation

◆ value

T value
private

Definition at line 39 of file ArrayHelpers.hpp.

◆ increment

const V increment
private

Definition at line 40 of file ArrayHelpers.hpp.


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