1 // State.h: interface for the CState class.
2 // 2001 Fleury David, Nevrax
4 //////////////////////////////////////////////////////////////////////
6 #if !defined(AFX_STATE_H__8501C0A2_320A_42B9_BD7E_3D77F27301ED__INCLUDED_)
7 #define AFX_STATE_H__8501C0A2_320A_42B9_BD7E_3D77F27301ED__INCLUDED_
11 #endif // _MSC_VER > 1000
30 m_bActionIsMessage
= FALSE
;
37 const CString
&getEventAsString() const;
41 CString m_sConditionName
;
43 /// bool, true if the event action is sending a message, false if it's changing state
44 bool m_bActionIsMessage
;
46 /// \name event message
48 ///destination of the message (name of a .bot, .flaura, .var... file)
49 CString m_sMessageDestination
;
50 /// message ID (selected from valid ID for given destination (file extension))
52 /// message arguments, syntax defined for given message ID
56 /// \name state change event
58 /// destination state (if m_bActionIsMessage == false)
59 CString m_sStateChange
;
62 /// temp string used to store the event as a string when requested
63 mutable CString eventString
;
65 friend bool operator==( const CEvent
&ev1
, const CEvent
&ev2
);
69 typedef CList
< CEvent
*, CEvent
*&> TPEventList
;
82 CState( const CString
&name
= CString("") );
85 CState( const CState
&state
);
89 /// add an event to this State
90 inline void addEvent( CEvent
*event
) { m_evEvents
.AddTail( event
) ; }
92 /// remove the specified event from the state object, return TRUE if done, FALSE if event not found
93 BOOL
removeEvent( CEvent
*event
);
101 /// list of pointers on CEvent objects
102 TPEventList m_evEvents
;
107 * Set a CLogicState from a CState
109 void cStateToCLogicState( CState
& state
, NLLOGIC::CLogicState
& logicState
);
112 * Set a CState from a CLogicState
114 void cLogicStateToCState( const NLLOGIC::CLogicState
& logicState
, CState
& state
);
117 #endif // !defined(AFX_STATE_H__8501C0A2_320A_42B9_BD7E_3D77F27301ED__INCLUDED_)