xoreos  0.0.5
container.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef ENGINES_JADE_SCRIPT_CONTAINER_H
26 #define ENGINES_JADE_SCRIPT_CONTAINER_H
27 
28 #include "src/common/types.h"
29 #include "src/common/ustring.h"
30 
31 #include "src/aurora/types.h"
32 
34 
35 #include "src/engines/jade/types.h"
36 
37 namespace Aurora {
38  namespace NWScript {
39  class Object;
40  struct ScriptState;
41  }
42 }
43 namespace Engines {
44 
45 namespace Jade {
46 
48 public:
51 
52  const Common::UString &getScript(Script script) const;
53 
54  bool hasScript(Script script) const;
55 
56  bool runScript(Script script,
59 
60  static bool runScript(const Common::UString &script,
63  static bool runScript(const Common::UString &script,
64  const Aurora::NWScript::ScriptState &state,
67 
68 protected:
69  void clearScripts();
70 
71  void readScripts(const Aurora::GFF3Struct &gff);
72  void readScripts(const ScriptContainer &container);
73 
74 private:
76 };
77 
78 } // End of namespace Jade
79 
80 } // End of namespace Engines
81 
82 #endif // ENGINES_JADE_SCRIPT_CONTAINER_H
A class holding an UTF-8 string.
Definition: ustring.h:48
void readScripts(const Aurora::GFF3Struct &gff)
Definition: container.cpp:91
bool hasScript(Script script) const
Definition: container.cpp:82
const Common::UString & getScript(Script script) const
Definition: container.cpp:76
bool runScript(Script script, const Aurora::NWScript::ObjectReference owner=Aurora::NWScript::ObjectReference(), const Aurora::NWScript::ObjectReference triggerer=Aurora::NWScript::ObjectReference())
Definition: container.cpp:110
Basic Jade Empire type definitions.
Low-level type definitions to handle fixed width types portably.
Unicode string handling.
Basic type definitions to handle files used in BioWare&#39;s Aurora engine.
Reference to an NWScript object.
A struct within a GFF3.
Definition: gff3file.h:164
Common::UString _scripts[kScriptMAX]
Definition: container.h:75