The MAUVE Toolchain
mauve::runtime::AbstractState Class Referenceabstract

Abstract State class. More...

#include <AbstractState.hpp>

Inheritance diagram for mauve::runtime::AbstractState:
Collaboration diagram for mauve::runtime::AbstractState:

Public Member Functions

 AbstractState (AbstractState const &other)=delete
 
virtual time_ns_t get_clock () const =0
 Get the clock value of the SynchroState "name". More...
 
virtual std::size_t get_next_size () const =0
 Return the number of transitions.
 
virtual AbstractStateget_next_state (int index) const =0
 Return the next state according to the index.
 
virtual bool is_execution () const =0
 Check if the state is an Execution state.
 
virtual bool is_synchronization () const =0
 Check if the state is a Synchronization state.
 
AbstractStateoperator= (AbstractState const &other)=delete
 
virtual bool set_clock (time_ns_t clock)=0
 Change the clock value of the SynchroState "name". More...
 
virtual std::string to_string () const =0
 Return the state as a string.
 

Public Attributes

friend AbstractFiniteStateMachine
 
std::string const name
 State name.
 

Protected Member Functions

 AbstractState (AbstractFiniteStateMachine *container, std::string const &name)
 

Protected Attributes

const AbstractFiniteStateMachinecontainer
 

Detailed Description

Abstract State class.

Member Function Documentation

virtual time_ns_t mauve::runtime::AbstractState::get_clock ( ) const
pure virtual

Get the clock value of the SynchroState "name".

Returns
the clock value of the SynchroState or 0 if the state is not a SynchroState

Implemented in mauve::runtime::ExecState< CORE >, and mauve::runtime::SynchroState< CORE >.

virtual bool mauve::runtime::AbstractState::set_clock ( time_ns_t  clock)
pure virtual

Change the clock value of the SynchroState "name".

Returns
true if the FSM is not configured and if a SynchroState named "name" exists, false otherwise

Implemented in mauve::runtime::ExecState< CORE >, and mauve::runtime::SynchroState< CORE >.