# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLLOGIC::CLogicState Class Reference

CLogicState. More...

#include <logic_state.h>

List of all members.

Public Methods

 CLogicState ()
 Default constructor. More...

void setLogicStateMachine (CLogicStateMachine *logicStateMachine)
 Set the state machine which contains this state. More...

void setName (std::string name)
 set the state name. More...

std::string getName ()
 get the state name. More...

void addEvent (CLogicEvent event)
 Add an event. More...

void addSIdMap (const TSIdMap &sIdMap)
 Associate message destination name with sid. More...

void processLogic ()
 Test the conditions of this state. More...

void getMessagesToSend (std::multimap< NLMISC::CEntityId, NLNET::CMessage > &msgs)
 Get the messages to send. More...

void enterState ()
 send the entry messages. More...

void exitState ()
 send the exit messages. More...

void trySendEntryMessages ()
 Try to send the entry messages. More...

void trySendEventMessages ()
 Try to send the event messages. More...

void fillVarMap (std::multimap< NLMISC::CEntityId, std::string > &stateMachineVariables)
 Fill a map associating all the referenced var in the state with the id of service managing them (debug purpose). More...

void write (xmlNodePtr node) const
 serial. More...

void read (xmlNodePtr node)

Public Attributes

std::string _StateName
 state name. More...

std::vector< CLogicEventMessage_EntryMessages
 entry messages. More...

std::vector< CLogicEventMessage_ExitMessages
 exit messages. More...

std::vector< CLogicEvent_Events
 logic. More...

CLogicStateMachine_LogicStateMachine
 state machine containing this state. More...

std::multimap< NLMISC::CEntityId,
NLNET::CMessage
_MessagesToSend
 messages to send by the service. More...


Detailed Description

CLogicState.

Author:
Stephane Coutelas , Nevrax France
Date:
2001

Definition at line 56 of file logic_state.h.


Constructor & Destructor Documentation

NLLOGIC::CLogicState::CLogicState  
 

Default constructor.

Definition at line 42 of file logic_state.cpp.

References _LogicStateMachine, and _StateName.


Member Function Documentation

void NLLOGIC::CLogicState::addEvent CLogicEvent    event
 

Add an event.

Parameters:
event  is the event to add

Definition at line 81 of file logic_state.cpp.

References _Events, and _LogicStateMachine.

void NLLOGIC::CLogicState::addSIdMap const TSIdMap   sIdMap
 

Associate message destination name with sid.

Parameters:
sIdMap  is the map associating destination name with a destination id

Definition at line 96 of file logic_state.cpp.

References _EntryMessages, _Events, _ExitMessages, trySendEntryMessages, trySendEventMessages, and NLLOGIC::TSIdMap.

void NLLOGIC::CLogicState::enterState  
 

send the entry messages.

Definition at line 184 of file logic_state.cpp.

References trySendEntryMessages.

void NLLOGIC::CLogicState::exitState  
 

send the exit messages.

Definition at line 196 of file logic_state.cpp.

References _EntryMessages, _Events, _ExitMessages, and _MessagesToSend.

void NLLOGIC::CLogicState::fillVarMap std::multimap< NLMISC::CEntityId, std::string > &    stateMachineVariables
 

Fill a map associating all the referenced var in the state with the id of service managing them (debug purpose).

void NLLOGIC::CLogicState::getMessagesToSend std::multimap< NLMISC::CEntityId, NLNET::CMessage > &    msgs
 

Get the messages to send.

Parameters:
msgs  is the map associating all the message to send with their destination id

std::string NLLOGIC::CLogicState::getName   [inline]
 

get the state name.

Returns:
the state's name

Definition at line 104 of file logic_state.h.

References _StateName.

void NLLOGIC::CLogicState::processLogic  
 

Test the conditions of this state.

Definition at line 148 of file logic_state.cpp.

References _Events, _LogicStateMachine, and trySendEventMessages.

void NLLOGIC::CLogicState::read xmlNodePtr    node
 

Definition at line 379 of file logic_state.cpp.

References _EntryMessages, _Events, _ExitMessages, _StateName, NLLOGIC::getXMLProp, v, and NLLOGIC::xmlCheckNodeName.

void NLLOGIC::CLogicState::setLogicStateMachine CLogicStateMachine   logicStateMachine
 

Set the state machine which contains this state.

Parameters:
logicStateMachine  is the state machine containing this block

Definition at line 54 of file logic_state.cpp.

References _Events, _LogicStateMachine, and nlwarning.

void NLLOGIC::CLogicState::setName std::string    name [inline]
 

set the state name.

Parameters:
name  is the new state's name

Definition at line 97 of file logic_state.h.

References _StateName.

void NLLOGIC::CLogicState::trySendEntryMessages  
 

Try to send the entry messages.

Definition at line 239 of file logic_state.cpp.

References _EntryMessages, and _MessagesToSend.

Referenced by addSIdMap, and enterState.

void NLLOGIC::CLogicState::trySendEventMessages  
 

Try to send the event messages.

Definition at line 265 of file logic_state.cpp.

References _Events, and _MessagesToSend.

Referenced by addSIdMap, and processLogic.

void NLLOGIC::CLogicState::write xmlNodePtr    node const
 

serial.

Definition at line 359 of file logic_state.cpp.

References _EntryMessages, _Events, _ExitMessages, and _StateName.


Member Data Documentation

std::vector<CLogicEventMessage> NLLOGIC::CLogicState::_EntryMessages
 

entry messages.

Definition at line 64 of file logic_state.h.

Referenced by addSIdMap, exitState, read, trySendEntryMessages, and write.

std::vector<CLogicEvent> NLLOGIC::CLogicState::_Events
 

logic.

Definition at line 70 of file logic_state.h.

Referenced by addEvent, addSIdMap, exitState, processLogic, read, setLogicStateMachine, trySendEventMessages, and write.

std::vector<CLogicEventMessage> NLLOGIC::CLogicState::_ExitMessages
 

exit messages.

Definition at line 67 of file logic_state.h.

Referenced by addSIdMap, exitState, read, and write.

CLogicStateMachine* NLLOGIC::CLogicState::_LogicStateMachine
 

state machine containing this state.

Definition at line 73 of file logic_state.h.

Referenced by addEvent, CLogicState, processLogic, and setLogicStateMachine.

std::multimap<NLMISC::CEntityId, NLNET::CMessage> NLLOGIC::CLogicState::_MessagesToSend
 

messages to send by the service.

Definition at line 76 of file logic_state.h.

Referenced by exitState, trySendEntryMessages, and trySendEventMessages.

std::string NLLOGIC::CLogicState::_StateName
 

state name.

Definition at line 61 of file logic_state.h.

Referenced by CLogicState, getName, read, setName, and write.


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