ADTF
Loading...
Searching...
No Matches
adtf::ucom::level_machine< Subclass, LevelType, START_LEVEL > Class Template Reference

#include <level_machine.h>

Inherited by adtf::streaming::ant::cFilterLevelmachine, and adtf::streaming::ant::streaming_level_machine.

Classes

struct  dispatcher
 
struct  dispatcher< Handler, InnerHandlers... >
 
struct  handler
 

Public Member Functions

template<typename ... InnerHandlers>
tResult ChangeLevel (LevelType eLevel)
 

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
 

Detailed Description

template<typename Subclass, typename LevelType, LevelType START_LEVEL>
class adtf::ucom::level_machine< Subclass, LevelType, START_LEVEL >

Generator template to create a Basic Level Machine implmentation.

Template Parameters
SubclassParent Class the implementation is used for
LevelTypeLevel decltype for the level machine
START_LEVELintial level after constructing

Member Enumeration Documentation

◆ tDirection

template<typename Subclass, typename LevelType, LevelType START_LEVEL>
enum adtf::ucom::ant::level_machine::tDirection : uint8_t
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

Member Function Documentation

◆ ChangeLevel()

template<typename Subclass, typename LevelType, LevelType START_LEVEL>
template<typename ... InnerHandlers>
tResult adtf::ucom::ant::level_machine< Subclass, LevelType, START_LEVEL >::ChangeLevel ( LevelType eLevel)
inline

Change Level raise or decrease the Level level by level and call the given hendler methods.

Template Parameters
InnerHandlersLevel Change handler methods
Returns
Return the Error Code of teh called Methods
Return values
ERR_NOERRORNot error occured.

◆ GetLevel()

template<typename Subclass, typename LevelType, LevelType START_LEVEL>
LevelType adtf::ucom::ant::level_machine< Subclass, LevelType, START_LEVEL >::GetLevel ( ) const
inlineprotected

Returns the current Level of the levelMachine.

Returns
The Level defined in LevelType

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