The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::State< EnumT, MetaDataT, MAX_MARKERS >::Monitor Class Referenceabstract

Monitor a particular State value and allow the user to determine a full state change. More...

#include <State.hpp>

Public Types

typedef State::EnumTValueType EnumTValueType
 Expose the State's EnumTValueType.
 

Public Member Functions

virtual void signalSet (const EnumTValueType &val, MetaDataTPtr)=0
 
virtual ~Monitor ()
 prevent deletion via the base pointer
 

Detailed Description

template<class EnumT, class MetaDataT = void, uint32_t MAX_MARKERS = 15>
class sparta::State< EnumT, MetaDataT, MAX_MARKERS >::Monitor

Monitor a particular State value and allow the user to determine a full state change.

This class supports the notion that a user wants to intervene in the transition of a State from one enum value to another. Instead of the State transitioning from State enum value 1 to enum value 2, the monitor will be signalled instead, and it's up to the developer of the Monitor to force the state change (via a call to State::setValue).

Definition at line 227 of file State.hpp.

Member Typedef Documentation

◆ EnumTValueType

template<class EnumT , class MetaDataT = void, uint32_t MAX_MARKERS = 15>
typedef State::EnumTValueType sparta::State< EnumT, MetaDataT, MAX_MARKERS >::Monitor::EnumTValueType

Expose the State's EnumTValueType.

Definition at line 232 of file State.hpp.

Constructor & Destructor Documentation

◆ ~Monitor()

template<class EnumT , class MetaDataT = void, uint32_t MAX_MARKERS = 15>
virtual sparta::State< EnumT, MetaDataT, MAX_MARKERS >::Monitor::~Monitor ( )
inlinevirtual

prevent deletion via the base pointer

Definition at line 239 of file State.hpp.

Member Function Documentation

◆ signalSet()

template<class EnumT , class MetaDataT = void, uint32_t MAX_MARKERS = 15>
virtual void sparta::State< EnumT, MetaDataT, MAX_MARKERS >::Monitor::signalSet ( const EnumTValueType val,
MetaDataTPtr   
)
pure virtual

Method called when the state enum is being changed

Parameters
valThe value about to be set

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