LibCT 2.0
|
00001 // ------------------------------------------------------------------ 00012 #ifndef _LIBCT_CONVERSATIONNODE_H 00013 #define _LIBCT_CONVERSATIONNODE_H 00014 00015 #include "Node.h" 00016 #include "VariableContainer.h" 00017 00018 #include <string> 00019 #include <vector> 00020 00021 namespace LibCT 00022 { 00024 class PhaseNode; 00025 class EventType; 00026 00028 class ConversationNode : public Node 00029 , public VariableContainer 00030 { 00031 public: 00032 enum Events 00033 { 00034 EventsOnEnter, 00035 EventsOnExit 00036 }; 00038 explicit ConversationNode( 00039 Node* pParent, 00040 const std::string& text 00041 ); 00042 00044 ~ConversationNode(); 00045 00048 bool SerialiseImpl(InputStream* pInput); 00049 00052 bool SerialiseImpl(OutputStream* pOutput); 00053 00057 PhaseNode* GetInitialPhase() const; 00058 00062 static ConversationNode* Load( 00063 InputStream* pInput 00064 ); 00065 00068 static void Save( 00069 ConversationNode* pConversation, 00070 OutputStream* pOutput 00071 ); 00072 00075 Node* GetNext(); 00076 00078 void Activate(); 00079 00081 void Deactivate(); 00082 00083 private: 00084 std::vector<std::string> m_Events; 00085 }; 00086 } 00087 00088 #endif // _LIBCT_CONVERSATIONNODE_H