|
|
|
|
Documentation |
|
Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages Search
NLLOGIC::CLogicStateMachine Class ReferenceCLogicStateMachine.
More...
#include <logic_state_machine.h>
List of all members.
Public Methods |
const std::map< std::string,
CLogicVariable > & | getVariables () |
const std::map< std::string,
CLogicCounter > & | getCounters () |
const std::map< std::string,
CLogicCondition > & | getConditions () |
const std::map< std::string,
CLogicState > & | getStates () |
| CLogicStateMachine () |
| Default constructor. More...
|
void | setName (const std::string &name) |
| Set the state machine name. More...
|
std::string | getName () const |
| Get the state machine name. More...
|
void | setCurrentState (std::string stateName) |
| Set the current state. More...
|
void | addSIdMap (const TSIdMap &sIdMap) |
| call the addSIdMap() method for each sate machines. More...
|
void | processLogic () |
| call the processLogic method for each sate machines. More...
|
void | getSelfAddressedMessages (std::list< NLNET::CMessage > &msgs) |
| Get the self-addressed message. More...
|
void | addVariable (CLogicVariable var) |
| Add a variable in the state machine. More...
|
bool | getVariable (std::string &varName, CLogicVariable &var) |
| Get the variable. More...
|
void | addCounter (CLogicCounter counter) |
| Add a counter in the state machine. More...
|
void | addCondition (CLogicCondition condition) |
| Add a condition in the state machine. More...
|
bool | getCondition (const std::string &condName, CLogicCondition &cond) |
| Get the condition. More...
|
void | getMessagesToSend (std::multimap< NLMISC::CEntityId, NLNET::CMessage > &msgs) |
| Get the messages to send. More...
|
void | addState (CLogicState logicState) |
| Add a state to the state machine. More...
|
void | modifyVariable (std::string varName, std::string modifOperator, sint64 value) |
| modify a variable. More...
|
void | displayVariables () |
| Display the variables. More...
|
void | displayStates () |
| Display the states. More...
|
void | setVerbose (std::string varName, bool b) |
| Set the verbose mode for a variable. More...
|
void | write (xmlDocPtr doc) const |
void | read (xmlNodePtr node) |
Private Attributes |
std::map< std::string, CLogicVariable > | _Variables |
| variables. More...
|
std::map< std::string, CLogicCounter > | _Counters |
| counters. More...
|
std::map< std::string, CLogicCondition > | _Conditions |
| conditions used in this state machine. More...
|
std::map< std::string, CLogicState > | _States |
| states. More...
|
std::string | _CurrentState |
| name of the current state. More...
|
std::string | _Name |
| name of this sate machine. More...
|
Detailed Description
CLogicStateMachine.
-
Author:
-
Stephane Coutelas , Nevrax France
-
Date:
-
2001
Definition at line 56 of file logic_state_machine.h.
Constructor & Destructor Documentation
NLLOGIC::CLogicStateMachine::CLogicStateMachine |
( |
|
) |
[inline] |
|
Member Function Documentation
void NLLOGIC::CLogicStateMachine::addCondition |
( |
CLogicCondition |
condition |
) |
|
|
void NLLOGIC::CLogicStateMachine::addCounter |
( |
CLogicCounter |
counter |
) |
[inline] |
|
|
Add a counter in the state machine.
-
Parameters:
-
counter |
is the new counter to add in this state machine |
Definition at line 150 of file logic_state_machine.h.
References _Counters. |
void NLLOGIC::CLogicStateMachine::addSIdMap |
( |
const TSIdMap & |
sIdMap |
) |
|
|
void NLLOGIC::CLogicStateMachine::addState |
( |
CLogicState |
logicState |
) |
|
|
|
Add a state to the state machine.
-
Parameters:
-
state |
is the new state to add in this state machine |
Definition at line 136 of file logic_state_machine.cpp.
References _States. |
void NLLOGIC::CLogicStateMachine::addVariable |
( |
CLogicVariable |
var |
) |
[inline] |
|
|
Add a variable in the state machine.
-
Parameters:
-
var |
is the new variable to add in this state machine |
Definition at line 134 of file logic_state_machine.h.
References _Variables. |
void NLLOGIC::CLogicStateMachine::displayStates |
( |
|
) |
|
|
void NLLOGIC::CLogicStateMachine::displayVariables |
( |
|
) |
|
|
bool NLLOGIC::CLogicStateMachine::getCondition |
( |
const std::string & |
condName, |
|
|
CLogicCondition & |
cond |
|
) |
|
|
|
Get the condition.
-
Parameters:
-
condName |
is the name of the condition to get |
cond |
is the condition to get |
-
Returns:
-
true if the condition has been found, false if not
Definition at line 232 of file logic_state_machine.cpp.
References _Conditions. |
const std::map<std::string, CLogicCondition>& NLLOGIC::CLogicStateMachine::getConditions |
( |
|
) |
[inline] |
|
const std::map<std::string, CLogicCounter>& NLLOGIC::CLogicStateMachine::getCounters |
( |
|
) |
[inline] |
|
|
Get the messages to send.
-
Parameters:
-
msgs |
is the list used to store the messages to send |
|
std::string NLLOGIC::CLogicStateMachine::getName |
( |
|
) |
const [inline] |
|
|
Get the self-addressed message.
-
Parameters:
-
msgs |
is the list used to store the self-addressed messages |
|
const std::map<std::string, CLogicState>& NLLOGIC::CLogicStateMachine::getStates |
( |
|
) |
[inline] |
|
bool NLLOGIC::CLogicStateMachine::getVariable |
( |
std::string & |
varName, |
|
|
CLogicVariable & |
var |
|
) |
|
|
|
Get the variable.
-
Parameters:
-
varName |
is the name of the variable to get |
var |
is the variable to get |
-
Returns:
-
true if the variable has been found, false if not
Definition at line 206 of file logic_state_machine.cpp.
References _Counters, and _Variables. |
const std::map<std::string, CLogicVariable>& NLLOGIC::CLogicStateMachine::getVariables |
( |
|
) |
[inline] |
|
void NLLOGIC::CLogicStateMachine::modifyVariable |
( |
std::string |
varName, |
|
|
std::string |
modifOperator, |
|
|
sint64 |
value |
|
) |
|
|
|
modify a variable.
-
Parameters:
-
varName |
is the name of the variable to modify |
modifOperator |
can be one of these operators :"SET"("set"),"ADD"("add"),"SUB"("sub"),"MUL"("mul"),"DIV"("div") |
value |
is the value to use along with the modificator |
Definition at line 252 of file logic_state_machine.cpp.
References _Counters, _Name, _Variables, nlwarning, and value. |
void NLLOGIC::CLogicStateMachine::processLogic |
( |
|
) |
|
|
void NLLOGIC::CLogicStateMachine::read |
( |
xmlNodePtr |
node |
) |
|
|
void NLLOGIC::CLogicStateMachine::setCurrentState |
( |
std::string |
stateName |
) |
|
|
void NLLOGIC::CLogicStateMachine::setName |
( |
const std::string & |
name |
) |
[inline] |
|
|
Set the state machine name.
-
Parameters:
-
name |
is the name of state machine |
Definition at line 94 of file logic_state_machine.h.
References _Name.
Referenced by read. |
void NLLOGIC::CLogicStateMachine::setVerbose |
( |
std::string |
varName, |
|
|
bool |
b |
|
) |
|
|
void NLLOGIC::CLogicStateMachine::write |
( |
xmlDocPtr |
doc |
) |
const |
|
Member Data Documentation
std::map<std::string, CLogicCondition> NLLOGIC::CLogicStateMachine::_Conditions [private]
|
|
std::map<std::string, CLogicCounter> NLLOGIC::CLogicStateMachine::_Counters [private]
|
|
std::string NLLOGIC::CLogicStateMachine::_CurrentState [private]
|
|
std::string NLLOGIC::CLogicStateMachine::_Name [private]
|
|
std::map<std::string, CLogicState> NLLOGIC::CLogicStateMachine::_States [private]
|
|
std::map<std::string, CLogicVariable> NLLOGIC::CLogicStateMachine::_Variables [private]
|
|
The documentation for this class was generated from the following files:
|
|