ADTF
|
Generator template to create a Basic Level Machine implmentation. More...
Classes | |
struct | dispatcher |
Internal dispatcher to find handler for level chnage. More... | |
struct | dispatcher< Handler, InnerHandlers... > |
Internal dispatcher to get the handler method for level chnage. More... | |
struct | handler |
Definition of handler method. More... | |
Public Member Functions | |
template<typename ... InnerHandlers> | |
tResult | ChangeLevel (LevelType eLevel) |
Change Level raise or decrease the Level level by level and call the given hendler methods. More... | |
Protected Types | |
enum | tDirection : uint8_t { Inc = 0 , Dec = 1 } |
Direction of entering a new Level. More... | |
typedef tResult(Subclass::* | tChangeMethod) () |
Defintion of function type called within the handler implementation. | |
Protected Member Functions | |
virtual | ~level_machine ()=default |
DTOR. | |
LevelType | GetLevel () const |
Returns the current Level of the levelMachine. More... | |
Private Attributes | |
LevelType | m_eLevel = START_LEVEL |
The current Level. | |
Generator template to create a Basic Level Machine implmentation.
Subclass | Parent Class the implementation is used for |
LevelType | Level decltype for the level machine |
START_LEVEL | intial level after constructing |
Definition at line 25 of file level_machine.h.
|
protected |
Direction of entering a new Level.
Enumerator | |
---|---|
Inc | entering a Level by increasing level_machine::m_eLevel |
Dec | entering a Level by decreasing level_machine::m_eLevel |
Definition at line 34 of file level_machine.h.
|
inline |
Change Level raise or decrease the Level level by level and call the given hendler methods.
InnerHandlers | Level Change handler methods |
ERR_NOERROR | Not error occured. |
Definition at line 121 of file level_machine.h.
References level_machine< Subclass, LevelType, START_LEVEL >::Dec, level_machine< Subclass, LevelType, START_LEVEL >::Inc, level_machine< Subclass, LevelType, START_LEVEL >::m_eLevel, RETURN_IF_FAILED, and RETURN_NOERROR.
|
inlineprotected |
Returns the current Level of the levelMachine.
Definition at line 74 of file level_machine.h.
References level_machine< Subclass, LevelType, START_LEVEL >::m_eLevel.