FACT++  1.0
bool StateMachineImp::AddStateName ( const int  state,
const std::string &  name,
const std::string &  doc = "" 
)
protectedvirtual

To be able to name states, i.e. present the current state in human readable for to the user, a string can be assigned to each state. For each state this function can be called only once, i.e. state name cannot be overwritten.

Be aware that two states should not have the same name!

Parameters
stateNumber of the state to which a name should be assigned
nameA name which should be assigned to the state, e.g. "Tracking"
docA explanatory text describing the state

Reimplemented in StateMachineDim.

Definition at line 644 of file StateMachineImp.cc.

References fStateNames.

Referenced by StateMachineDim::AddStateName(), SetDefaultStateNames(), and Wrapper().

645 {
646  //auto it = fStateNames.find(state);
647 
648  //if (/*it!=fStateNames.end() &&*/ !it->second.first.empty())
649  // return false;
650 
651  fStateNames[state] = make_pair(name, doc);
652  return true;
653 }
StateNames fStateNames
Human readable names associated with the states.

+ Here is the caller graph for this function: