rad  3.0.0
Public Member Functions | List of all members
scxml4cpp::Helper Class Reference

#include <Helper.h>

Public Member Functions

 Helper ()
 
 ~Helper ()
 
const std::string printStateType (State *s)
 
const std::string printTransition (Transition *t)
 
const std::string printTransitions (std::list< Transition * > &transitions)
 
const std::string printTargetState (Transition *transitions)
 
const std::string printTargetStates (std::list< Transition * > &transitions)
 
const std::string printActions (std::list< Action * > &actions)
 
const std::string printActivities (std::list< Activity * > &activities)
 
const std::string printStates (State *s)
 
const std::string printStateMachine (StateMachine &)
 
const std::string formatStatus (std::set< State * > &status, const bool usefullyqualified=false)
 
bool compareStateDocOrder (State *s1, State *s2)
 
void sortAtomicStates (std::set< State * > &status, std::vector< State * > &sortedStatus)
 
bool isInState (const std::set< State * > &status, const std::list< std::string > &stateNames)
 
int countParents (State *)
 
bool isDescendant (State *, State *)
 
std::set< State * > getAncestors (std::list< State * > &states)
 
std::list< State * > getAncestorsList (std::set< State * > &states)
 
std::set< State * > getAncestors (State *)
 
std::list< State * > getAncestorsList (State *)
 
std::list< State * > getProperAncestors (State *, State *)
 
StatefindLeastCommonAncestor (State *, State *)
 
bool eventMatch (const Event &, const Event &)
 
std::list< State * > getAtomicStates (std::set< State * > &states)
 
std::list< State * > getAtomicStates (std::list< State * > &states)
 
bool isPreempted (State *, std::list< Transition * > &transitions)
 

Constructor & Destructor Documentation

◆ Helper()

Helper::Helper ( )

◆ ~Helper()

Helper::~Helper ( )

Member Function Documentation

◆ compareStateDocOrder()

bool Helper::compareStateDocOrder ( State s1,
State s2 
)

Compare the position of states in the model: s1 < s2 if s1 appears in the model before s2.

This practically means that, in the list of substates maintained by the common ancestor, s1 is positioned before s2.

A nullptr is considered to be always before a non-null state.

Parameters
s1First state to compare
s2Second state to compare
Returns
true if s1 < s2, false otherwise
0 if s1 == s2, -1 if s1 < s2, +1 if s1 > s2

◆ countParents()

int Helper::countParents ( State s)

This method is used by the StateComparator class to provide a way to compare states based on the number of parents (i.e. level in the state composition tree).

Returns
0 in case of nullptr, 1 in case the state has no parents, or (1 + the number of parents).

◆ eventMatch()

bool Helper::eventMatch ( const Event e1,
const Event e2 
)

◆ findLeastCommonAncestor()

State * Helper::findLeastCommonAncestor ( State s1,
State s2 
)

◆ formatStatus()

const std::string Helper::formatStatus ( std::set< State * > &  status,
const bool  usefullyqualified = false 
)

◆ getAncestors() [1/2]

std::set< State * > Helper::getAncestors ( State state)

◆ getAncestors() [2/2]

std::set< State * > Helper::getAncestors ( std::list< State * > &  states)

◆ getAncestorsList() [1/2]

std::list< State * > Helper::getAncestorsList ( State state)

◆ getAncestorsList() [2/2]

std::list< State * > Helper::getAncestorsList ( std::set< State * > &  states)

◆ getAtomicStates() [1/2]

std::list< State * > Helper::getAtomicStates ( std::list< State * > &  states)

◆ getAtomicStates() [2/2]

std::list< State * > Helper::getAtomicStates ( std::set< State * > &  states)

◆ getProperAncestors()

std::list< State * > Helper::getProperAncestors ( State state,
State upperBound 
)

◆ isDescendant()

bool Helper::isDescendant ( State s,
State p 
)

◆ isInState()

bool Helper::isInState ( const std::set< State * > &  status,
const std::list< std::string > &  stateNames 
)

◆ isPreempted()

bool Helper::isPreempted ( State s,
std::list< Transition * > &  transitions 
)

◆ printActions()

const std::string Helper::printActions ( std::list< Action * > &  actions)

◆ printActivities()

const std::string Helper::printActivities ( std::list< Activity * > &  activities)

◆ printStateMachine()

const std::string Helper::printStateMachine ( StateMachine sm)

◆ printStates()

const std::string Helper::printStates ( State s)

◆ printStateType()

const std::string Helper::printStateType ( State s)

◆ printTargetState()

const std::string Helper::printTargetState ( Transition transitions)

◆ printTargetStates()

const std::string Helper::printTargetStates ( std::list< Transition * > &  transitions)

◆ printTransition()

const std::string Helper::printTransition ( Transition t)

◆ printTransitions()

const std::string Helper::printTransitions ( std::list< Transition * > &  transitions)

◆ sortAtomicStates()

void Helper::sortAtomicStates ( std::set< State * > &  status,
std::vector< State * > &  sortedStatus 
)

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