NLLOGIC::CLogicEventAction Class Reference

#include <logic_event.h>


Detailed Description

CLogicEventAction

Author:
Stephane Coutelas

Nevrax France

Date:
2001

Definition at line 105 of file logic_event.h.

Public Member Functions

 CLogicEventAction ()
void enableSendMessage ()
void read (xmlNodePtr node)
void write (xmlNodePtr node) const

Data Fields

CLogicEventMessage EventMessage
 event message

bool IsStateChange
 true if this action consist in a state change, false if it's a message

std::string StateChange
 state name for state change


Constructor & Destructor Documentation

NLLOGIC::CLogicEventAction::CLogicEventAction  )  [inline]
 

Default constructor

Definition at line 121 of file logic_event.h.

References IsStateChange.

00122         {
00123                 IsStateChange = false;
00124         }


Member Function Documentation

void NLLOGIC::CLogicEventAction::enableSendMessage  ) 
 

This message will be sent as soon as the dest id will be given

Definition at line 89 of file logic_event.cpp.

References EventMessage, and NLLOGIC::CLogicEventMessage::ToSend.

00090 {
00091         EventMessage.ToSend = true;
00092 
00093 } // enableSendMessage //

void NLLOGIC::CLogicEventAction::read xmlNodePtr  node  ) 
 

Definition at line 132 of file logic_event.cpp.

References EventMessage, NLLOGIC::getXMLProp(), IsStateChange, NLLOGIC::CLogicEventMessage::read(), StateChange, and NLLOGIC::xmlCheckNodeName().

Referenced by NLLOGIC::CLogicEvent::read().

00133 {
00134         xmlCheckNodeName (node, "EVENT_ACTION");
00135 
00136         IsStateChange = atoi(getXMLProp (node, "IsStateChange").c_str()) == 1;
00137         if (IsStateChange)
00138         {
00139                 StateChange = getXMLProp (node, "StateChange");
00140         }
00141         else
00142         {
00143                 EventMessage.read(node);
00144         }
00145 }

void NLLOGIC::CLogicEventAction::write xmlNodePtr  node  )  const
 

serial

Definition at line 118 of file logic_event.cpp.

References EventMessage, IsStateChange, StateChange, and NLLOGIC::CLogicEventMessage::write().

Referenced by NLLOGIC::CLogicEvent::write().

00119 {
00120         xmlNodePtr elmPtr = xmlNewChild ( node, NULL, (const xmlChar*)"EVENT_ACTION", NULL);
00121         xmlSetProp (elmPtr, (const xmlChar*)"IsStateChange", (const xmlChar*)toString(IsStateChange).c_str());
00122         if (IsStateChange)
00123         {
00124                 xmlSetProp (elmPtr, (const xmlChar*)"StateChange", (const xmlChar*)StateChange.c_str());
00125         }
00126         else
00127         {
00128                 EventMessage.write(elmPtr);
00129         }
00130 }


Field Documentation

CLogicEventMessage NLLOGIC::CLogicEventAction::EventMessage
 

event message

Definition at line 116 of file logic_event.h.

Referenced by enableSendMessage(), read(), NLLOGIC::CLogicEvent::reset(), and write().

bool NLLOGIC::CLogicEventAction::IsStateChange
 

true if this action consist in a state change, false if it's a message

Definition at line 110 of file logic_event.h.

Referenced by CLogicEventAction(), read(), and write().

std::string NLLOGIC::CLogicEventAction::StateChange
 

state name for state change

Definition at line 113 of file logic_event.h.

Referenced by read(), and write().


The documentation for this class was generated from the following files:
Generated on Tue Mar 16 12:53:59 2004 for NeL by doxygen 1.3.6