#include <RepeatGuard.h>
Inheritance diagram for RepeatGuard:
Public Member Functions | |
RepeatGuard (ACS::TimeInterval interval, unsigned int maxRepetitions, bool or_or_and=true) | |
~RepeatGuard () | |
bool | check () |
bool | checkAndIncrement () |
void | increment () |
unsigned int | count () |
void | reset () |
void | reset (ACS::TimeInterval interval, unsigned int maxRepetitions, bool or_or_and=true) |
Protected Attributes | |
unsigned int | counter |
unsigned int | counterAtLastCheck |
unsigned int | maxRepetitions |
unsigned int | method |
bool | firstTime |
ACS::TimeInterval | interval |
ACS::Time | lastTime |
ACE_Recursive_Thread_Mutex | mutex |
This class intends to be a generic class to avoid repetition of code blocks. It is also intended as a base class for other specific uses, such as RepetGuardLogger.
|
Constructor
|
|
|
|
This method returns true or false if the next block of code is allowed to be executed or not.
|
|
This method returns true or false if the next block of code is allowed to be executed or not. Also it increments the counter.
|
|
To see how many attempts have been made.
|
|
Increments the repetition counter. |
|
Resets counter and time of the last time check() returned true.
|
|
Resets counter and time of the last time check() returned true. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|