Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / logic / logic_editor_dll / State.h
blob9f8dec26d3c9324922968913da59515c8891f8d7
1 // State.h: interface for the CState class.
2 // 2001 Fleury David, Nevrax
3 //
4 //////////////////////////////////////////////////////////////////////
6 #if !defined(AFX_STATE_H__8501C0A2_320A_42B9_BD7E_3D77F27301ED__INCLUDED_)
7 #define AFX_STATE_H__8501C0A2_320A_42B9_BD7E_3D77F27301ED__INCLUDED_
9 #if _MSC_VER > 1000
10 #pragma once
11 #endif // _MSC_VER > 1000
14 #include <afxtempl.h>
17 namespace NLLOGIC
19 class CLogicState;
22 /**
23 * class CEvent
25 class CEvent
27 public:
28 CEvent()
30 m_bActionIsMessage = FALSE;
33 virtual ~CEvent()
37 const CString &getEventAsString() const;
39 //attributes:
40 public:
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
47 //@{
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))
51 CString m_sMessageID;
52 /// message arguments, syntax defined for given message ID
53 CString m_sArguments;
54 //@}
56 /// \name state change event
57 //@{
58 /// destination state (if m_bActionIsMessage == false)
59 CString m_sStateChange;
60 //@]
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;
75 /**
76 * class State
78 class CState
80 public:
81 /// constructor
82 CState( const CString &name = CString("") );
84 /// copy constructor
85 CState( const CState &state );
87 virtual ~CState();
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);
96 // attributes
97 //private:
98 public:
99 CString m_sName;
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_)