Orxonox  0.0.5 Codename: Arcturus
DialogManager.h
Go to the documentation of this file.
1 /*
2  * ORXONOX - the hottest 3D action shooter ever to exist
3  * > www.orxonox.net <
4  *
5  *
6  * License notice:
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * Author:
23  * ...
24  * Co-authors:
25  * ...
26  *
27  */
28 
29 #ifndef _DialogManager_H__
30 #define _DialogManager_H__
31 
32 #include "DialogPrereqs.h"
33 #include "util/Singleton.h"
35 #include "core/object/Listable.h"
36 #include "Dialog.h"
37 
38 #include <string>
39 
40 namespace orxonox //tolua_export
41 
42 {//tolua_export
43 
56  class _DialogExport DialogManager //tolua_export
57  : public Singleton<DialogManager>
58  {//tolua_export
59  friend class Singleton<DialogManager>;
60 
61  public:
62 
63  DialogManager();
64 
73  static DialogManager& getInstance() { return Singleton<DialogManager>::getInstance(); } //tolua_export
74 
84  void setDialog(Dialog* dialog);
85 
86  //from here on functions for lua interface
87 
95  std::string getQuestion(); //tolua_export
96 
104  int getSize(); //tolua_export
105 
116  std::string getAnswer(int index); //tolua_export
117 
125  std::string getPerson(); //tolua_export
126 
134  bool endtest(int index); //tolua_export
135 
145  void update(int index); //tolua_export
146 
147 private:
149 
151  const std::vector<std::string>* answerIds_;
152 
153  };//tolua_export
154 }//tolua_export
155 
156 #endif /* _DialogManager_H__ */
#define _DialogExport
Definition: DialogPrereqs.h:60
class containing core of one dialog with one npc
Definition: Dialog.h:55
::std::string string
Definition: gtest-port.h:756
static DialogManager * singletonPtr_s
a pointer to the single class object
Definition: DialogManager.h:148
static DialogManager & getInstance()
gives the pointer to the sigleton dialog manager to the lua script
Definition: DialogManager.h:73
Dialog * currentTalk_
pointer to the currently active dialog or last active if no one is currently active ...
Definition: DialogManager.h:150
Shared library macros, enums, constants and forward declarations for the questsystem module ...
Base for singleton classes.
Definition: Singleton.h:114
const std::vector< std::string > * answerIds_
pointer to the possible answerIds of the current question, for faster access
Definition: DialogManager.h:151
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Declaration of Listable, the base of all classes whose instances can be stored in object lists...
Definition of the Singleton template that is used as base class for classes that allow only one insta...
static T & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
Definition of the ManageScopedSingleton macro.
this class is used for calling on a dialog form luascript
Definition: DialogManager.h:56