iv::Activator Struct Reference

#include <Activator.hpp>

Public Member Functions

 Activator ()
 
 Activator (unsigned char initial)
 
bool operator== (Activator const &other) const
 
bool operator!= (Activator const &other) const
 
bool operator< (Activator const &other) const
 
Activator MakeActivated () const
 
unsigned char ReadActivations (Activator const &reference) const
 
unsigned char CopyActivations (Activator &reference) const
 
bool CopyActivation (Activator &reference) const
 
unsigned char Value () const
 

Detailed Description

Counts number of times it was activated (typicaly a button was pressed). Client code will have its own counter copying this counter and therefore knowing about any new activations. The counter value can only increase (eventualy overflow), so do not compare using operator< but using operator!=.

Definition at line 16 of file Activator.hpp.

Constructor & Destructor Documentation

◆ Activator() [1/2]

iv::Activator::Activator ( )

Definition at line 6 of file Activator.cpp.

◆ Activator() [2/2]

iv::Activator::Activator ( unsigned char  initial)

Definition at line 11 of file Activator.cpp.

Member Function Documentation

◆ operator==()

bool iv::Activator::operator== ( Activator const &  other) const

Definition at line 16 of file Activator.cpp.

◆ operator!=()

bool iv::Activator::operator!= ( Activator const &  other) const

Definition at line 21 of file Activator.cpp.

◆ operator<()

bool iv::Activator::operator< ( Activator const &  other) const

Definition at line 26 of file Activator.cpp.

◆ MakeActivated()

Activator iv::Activator::MakeActivated ( ) const

One activation.

Definition at line 55 of file Activator.cpp.

◆ ReadActivations()

unsigned char iv::Activator::ReadActivations ( Activator const &  reference) const

Get how many activations are ther in this instance compared to localy-stored reference Activator.

Definition at line 31 of file Activator.cpp.

◆ CopyActivations()

unsigned char iv::Activator::CopyActivations ( Activator reference) const

Read activations from this instance and then copy them into the localy-stored reference Activator.

Definition at line 40 of file Activator.cpp.

◆ CopyActivation()

bool iv::Activator::CopyActivation ( Activator reference) const

Copy one activation to reference.

Definition at line 47 of file Activator.cpp.

◆ Value()

unsigned char iv::Activator::Value ( ) const

Definition at line 62 of file Activator.cpp.


The documentation for this struct was generated from the following files: