Orxonox  0.0.5 Codename: Arcturus
CorePrereqs.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  * Reto Grieder
24  * Co-authors:
25  * ...
26  *
27  */
28 
35 #ifndef _CorePrereqs_H__
36 #define _CorePrereqs_H__
37 
38 #include "OrxonoxConfig.h"
39 #include <boost/version.hpp>
40 #include <string>
41 
42 //-----------------------------------------------------------------------
43 // Shared library settings
44 //-----------------------------------------------------------------------
45 
46 #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( CORE_STATIC_BUILD )
47 # ifdef CORE_SHARED_BUILD
48 # define _CoreExport __declspec(dllexport)
49 # else
50 # if defined( __MINGW32__ )
51 # define _CoreExport
52 # else
53 # define _CoreExport __declspec(dllimport)
54 # endif
55 # endif
56 # define _CorePrivate
57 #elif defined (ORXONOX_GCC_VISIBILITY)
58 # define _CoreExport __attribute__ ((visibility("default")))
59 # define _CorePrivate __attribute__ ((visibility("hidden")))
60 #else
61 # define _CoreExport
62 # define _CorePrivate
63 #endif
64 
65 //-----------------------------------------------------------------------
66 // Constants
67 //-----------------------------------------------------------------------
68 
69 namespace orxonox
70 {
71  static constexpr uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1);
72 }
73 
74 //-----------------------------------------------------------------------
75 // Enums
76 //-----------------------------------------------------------------------
77 
78 namespace orxonox
79 {
80  namespace ScopeID
81  {
82  typedef int Value;
83 
85  static constexpr Value ROOT = 1;
86  static constexpr Value GRAPHICS = 2;
87  }
88 
89  namespace StaticInitialization
90  {
91  typedef int Type;
92 
93  static constexpr Type STATIC_INITIALIZATION_HANDLER = 1;
94  static constexpr Type IDENTIFIER = 2;
95  static constexpr Type SCOPED_SINGLETON_WRAPPER = 3;
96  static constexpr Type COMMAND_LINE_ARGUMENT = 4;
97  static constexpr Type CONSOLE_COMMAND = 5;
98  }
99 
100  namespace XMLPort
101  {
102  enum Mode
103  {
108  };
109  }
110 
111  namespace ConfigFileType
112  {
113  enum Value
114  {
118  // Don't forget to adjust the array size in the ConfigFileManager when adding a new entry here!
119  };
120  }
121 
122  namespace KeybindMode
123  {
124  enum Value
125  {
131  };
132  };
133 }
134 
135 //-----------------------------------------------------------------------
136 // Forward declarations
137 //-----------------------------------------------------------------------
138 
139 namespace orxonox
140 {
142 
143  template <class T, class U>
144  T orxonox_cast(U*);
145 
146  class ApplicationPaths;
147  class BaseObject;
148  template <class T>
150  template <class T>
152  template <class T>
153  class ClassIdentifier;
154  class ClassTreeMask;
155  class ClassTreeMaskIterator;
156  class ClassTreeMaskNode;
158  class CommandLineParser;
159  class CommandLineArgument;
160  class ConfigFile;
161  class ConfigFileEntry;
163  class ConfigFileEntryValue;
164  class ConfigFileManager;
165  class ConfigFileSection;
166  class Configurable;
167  class ConfigurablePaths;
168  class ConfigValueContainer;
169  class Context;
170  class Core;
171  class CoreConfig;
173  class Destroyable;
174  class DestroyLaterManager;
175  class DestructionListener;
176  class DynLib;
177  class DynLibManager;
178  struct Event;
179  class EventState;
180  class Factory;
181  class Game;
182  class GameConfig;
183  class GameState;
184  struct GameStateInfo;
185  struct GameStateTreeNode;
186  class GlowMaterialListener;
187  class GraphicsManager;
188  class GUIManager;
189  class Identifiable;
190  class Identifier;
191  template <class T>
192  class Iterator;
193  class Language;
194  class Listable;
195  class Loader;
196  class LuaFunctor;
197  class LuaState;
198  class MemoryArchive;
199  class MemoryArchiveFactory;
200  class ModuleInstance;
201  class Namespace;
202  class NamespaceNode;
203  template <class T>
204  class ObjectList;
205  class ObjectListBase;
206  class ObjectListBaseElement;
207  template <class T>
209  template <class T>
212  class OrxonoxClass;
213  class OrxonoxInterface;
214  class Plugin;
215  class PluginManager;
216  class PluginReference;
217  struct ResourceInfo;
218  template <ScopeID::Value>
219  class Scope;
220  class ScopeManager;
222  class SettingsConfigFile;
226  template <class T>
227  class StrongPtr;
228  template <class T>
229  class SubclassIdentifier;
230  class Template;
231  class Thread;
232  class ThreadPool;
233  class UpdateListener;
234  class ViewportEventListener;
235  template <class T>
236  class WeakPtr;
237  class WindowEventListener;
238  class XMLFile;
239  class XMLNameListener;
240  template <class T, class O>
242  template <class T>
245  class XMLPortParamContainer;
246 
247  // Command
248  class ArgumentCompleter;
250  class CommandEvaluation;
251  class ConsoleCommand;
252  class ConsoleCommandManager;
253  class Executor;
254  template <class T>
255  class ExecutorMember;
256  class ExecutorStatic;
257  class Functor;
258  template <class O>
259  class FunctorMember;
261  template <class F, class O>
262  class FunctorPointer;
263  class IOConsole;
264  class IRC;
265  class Shell;
266  class ShellListener;
267  class TclBind;
268  struct TclInterpreterBundle;
269  template <class T>
270  class TclThreadList;
271  class TclThreadManager;
272 
273  // Input
274  class BaseCommand;
275  class BufferedParamCommand;
276  class Button;
277  class HalfAxis;
278  class InputBuffer;
279  class InputDevice;
280  template <class Traits>
282  class InputHandler;
283  class InputManager;
284  class InputState;
285  struct InputStatePriority;
287  class JoyStick;
288  class KeyBinder;
289  class KeyBinderManager;
290  class Keyboard;
291  class KeyDetector;
292  class KeyEvent;
293  class Mouse;
294  class ParamCommand;
295  class SimpleCommand;
296 }
297 
298 #include "command/FunctorPtr.h"
299 #include "command/ExecutorPtr.h"
300 
301 // CppTcl
302 namespace Tcl
303 {
304  class interpreter;
305  class object;
306 }
307 
308 // Boost
309 namespace boost
310 {
311 #if (BOOST_VERSION < 104400)
312 
313  namespace filesystem
314  {
315  struct path_traits;
316  template <class String, class Traits> class basic_path;
318  }
319 
320 #elif (BOOST_VERSION < 105000)
321 
322 # if BOOST_FILESYSTEM_VERSION == 2
323  namespace filesystem2
324  {
325  struct path_traits;
326  template <class String, class Traits> class basic_path;
328  }
329  namespace filesystem
330  {
331  using filesystem2::basic_path;
332  using filesystem2::path_traits;
333  using filesystem2::path;
334  }
335 # elif BOOST_FILESYSTEM_VERSION == 3
336  namespace filesystem3
337  {
338  class path;
339  }
340  namespace filesystem
341  {
342  using filesystem3::path;
343  }
344 # endif
345 
346 #else
347 
348  namespace filesystem
349  {
350  class path;
351  }
352 
353 #endif
354 
355  class thread;
356  class mutex;
357  class shared_mutex;
358  class condition_variable;
359 }
360 
361 // Ogre
362 namespace Ogre
363 {
364  class DataStream;
365  template <class T> class SharedPtr;
367 }
368 namespace orxonox
369 {
370  // Import the Ogre::DataStream
371  using Ogre::DataStream;
372  using Ogre::DataStreamPtr;
373 }
374 
375 // CEGUI
376 namespace CEGUI
377 {
378  class DefaultLogger;
379  class Logger;
380  class LuaScriptModule;
381 
382 #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
383  class OgreCEGUIRenderer;
384  class OgreCEGUIResourceProvider;
385  class OgreCEGUITexture;
386 #else
387  class OgreRenderer;
388  class OgreResourceProvider;
389  class OgreImageCodec;
390 #endif
391 }
392 
393 // Lua
394 struct lua_State;
395 
396 // TinyXML and TinyXML++
397 class TiXmlString;
398 class TiXmlOutStream;
399 class TiXmlNode;
400 class TiXmlHandle;
401 class TiXmlDocument;
402 class TiXmlElement;
403 class TiXmlComment;
404 class TiXmlUnknown;
405 class TiXmlAttribute;
406 class TiXmlText;
407 class TiXmlDeclaration;
408 class TiXmlParsingData;
409 namespace ticpp
410 {
411  class Document;
412  class Element;
413  class Declaration;
414  class StylesheetReference;
415  class Text;
416  class Comment;
417  class Attribute;
418 }
419 namespace orxonox
420 {
421  using ticpp::Element;
422 }
423 
424 #endif /* _CorePrereqs_H__ */
Definition: PluginReference.h:38
The BaseObject is the parent of all classes representing an instance in the game. ...
Definition: BaseObject.h:63
Wraps around an OIS::JoyStick and forwards the input events to a list of input states.
Definition: JoyStick.h:60
Base class for all input handlers like KeyBinder, InputBuffer, etc.
Definition: InputHandler.h:118
Always the top level node.
Definition: tinyxml.h:1466
basic_path< std::string, path_traits > path
Definition: CorePrereqs.h:316
Heavily templated base class for all three input devices.
Definition: CorePrereqs.h:281
The Functor classes are used to wrap function pointers.
Definition: Functor.h:175
static constexpr Type COMMAND_LINE_ARGUMENT
Definition: CorePrereqs.h:96
Definition: CorePrereqs.h:105
Derive from this class to get informed when joy sticks get added/removed.
Definition: JoyStickQuantityListener.h:45
The ClassTreeMask is a set of rules, containing the information for each class whether it&#39;s included ...
Definition: ClassTreeMask.h:187
The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables t...
Definition: Identifier.h:262
The ConfigValuecontainer contains all needed information about a configurable variable.
Definition: ConfigValueContainer.h:98
Definition: StaticInitializationHandler.h:36
The Iterator allows to iterate through a given ObjectList.
Definition: CorePrereqs.h:192
The list-element that actually contains the object.
Definition: CorePrereqs.h:208
This class represents a normal value in the config file.
Definition: ConfigFileEntryValue.h:50
Definition: XMLPort.h:323
Provides a simple interface to CEGUI with tolua methods and console commands.
Definition: GUIManager.h:91
Typedefs and definitions of FunctorPtr, FunctorMemberPtr, FunctorStaticPtr, and FunctorPointerPtr.
Definition: CorePrereqs.h:241
Definition: Template.h:50
Definition: CorePrereqs.h:309
The ApplicationPaths class is a singleton which provides static paths of the application.
Definition: ApplicationPaths.h:57
The EventState contains information about an event state.
Definition: Event.h:77
Definition: DestroyLaterManager.h:40
Stores basic information about a Resource from Ogre.
Definition: Resource.h:58
The ConsoleCommand class stores all information about a console command which can be executed by Comm...
Definition: ConsoleCommand.h:88
Any tag that tinyXml doesn&#39;t recognize is saved as an unknown.
Definition: tinyxml.h:1427
This is the class from which all objects of the game-logic (not the engine) are derived from...
Definition: OrxonoxClass.h:53
Listable stores the entries of all object lists pointing to this instance.
Definition: Listable.h:50
Definition: CorePrereqs.h:126
::std::string string
Definition: gtest-port.h:756
Definition: CorePrereqs.h:129
A TiXmlHandle is a class that wraps a node pointer with null checks; this is an incredibly useful thi...
Definition: tinyxml.h:1715
Inherit from UpdateListener if you need to receive calls before or after the game is ticked...
Definition: UpdateListener.h:52
This class represents a line in the config file which contains only a comment.
Definition: ConfigFileEntryComment.h:49
A strong pointer which wraps a pointer to an object and keeps this object alive as long as the strong...
Definition: CorePrereqs.h:227
Definition: Loader.h:52
This class represents a config file, which is stored on the hard-disk and contains config values in d...
Definition: ConfigFile.h:51
Interface for receiving window events like resize, moved and focusChanged.
Definition: WindowEventListener.h:43
Representation of an interface to lua.
Definition: LuaState.h:74
Represents one node of the game state tree.
Definition: Game.cc:70
Definition: GameConfig.h:38
Definition: CorePrereqs.h:316
Various constants for compiler, architecture and platform.
Global interface to command line options.
Definition: CommandLineParser.h:132
Wraps around an OIS::Mouse and forwards the input events to a list of input states.
Definition: Keyboard.h:54
Definition: StaticInitializationManager.h:40
This is the class from which all interfaces of the game-logic (not the engine) are derived from...
Definition: OrxonoxInterface.h:50
The Shell is the logical component of the console that displays output to the user and allows him to ...
Definition: Shell.h:86
The Language class manges the language files and entries and stores the LanguageEntry objects in a ma...
Definition: Language.h:160
A singleton that stores all existing ConsoleCommands.
Definition: ConsoleCommandManager.h:48
Definition: tinystr.h:67
FunctorMember is a child class of Functor and expands it with an object-pointer, that is used for mem...
Definition: Functor.h:237
Definition: CorePrereqs.h:107
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
Definition: CorePrereqs.h:236
Helper object required before GameStates are being constructed.
Definition: Game.h:66
Value
Definition: CorePrereqs.h:113
Definition: ModuleInstance.h:42
Identifiable is needed to create the class-hierarchy at startup and to store the Identifier.
Definition: Identifiable.h:50
The ObjectListBase contains all objects of a given class.
Definition: ObjectListBase.h:125
Manages the different config files (settings, calibration, etc).
Definition: ConfigFileManager.h:52
This is the base class of all objects which may contain config values.
Definition: Configurable.h:47
The parent class for everything in the Document Object Model.
Definition: tinyxml.h:438
Definition: CorePrereqs.h:130
Definition: CorePrereqs.h:128
This class is used to wrap a Functor and to store default values for any of its parameters.
Definition: Executor.h:97
The ClassFactoryWithContext is able to create new objects of a specific class that require a context ...
Definition: CorePrereqs.h:151
static constexpr Type IDENTIFIER
Definition: CorePrereqs.h:94
Specialization of FunctorMember with T = void.
Definition: Functor.h:322
Definition: CoreConfig.h:38
Definition: Plugin.h:36
Definition: ViewportEventListener.h:39
Definition: XMLPort.h:504
An attribute is a name-value pair.
Definition: tinyxml.h:797
A child class of Executor, used for easier handling of non-static member-functions.
Definition: Executor.h:212
The Core class is a singleton used to configure the program basics.
Definition: Core.h:60
Definition: OgreCEGUIRenderer.cpp:46
Definition: Namespace.h:46
Definition: CorePrereqs.h:127
static constexpr Value ROOT
A list of available scopes for the Scope template.
Definition: CorePrereqs.h:85
A child class of Executor, used to distinguish executors that wrap static functions from executors th...
Definition: Executor.h:196
A thread-safe implementation of a message queue, used by TclThreadManager.
Definition: TclThreadList.h:52
An XML comment.
Definition: tinyxml.h:1171
Definition: tinyxmlparser.cpp:171
The Event struct contains information about a fired Event.
Definition: Event.h:51
In correct XML the declaration is the first entry in the file.
Definition: tinyxml.h:1294
Definition: NamespaceNode.h:45
A wrapper class for a Tcl interpreter.
Definition: TclBind.h:98
static constexpr Type STATIC_INITIALIZATION_HANDLER
Definition: CorePrereqs.h:93
Graphics engine manager class.
Definition: GraphicsManager.h:65
The ClassTreeMaskIterator moves through all ClassTreeMaskNodes of the internal tree of a ClassTreeMas...
Definition: ClassTreeMask.h:145
Wraps around an OIS::Mouse and forwards the input events to a list of input states.
Definition: Mouse.h:54
Enumeration wrapper for input state priorities.
Definition: InputPrereqs.h:452
The ClassFactory is the base-class of all class-spezific factories.
Definition: CorePrereqs.h:149
Definition: CorePrereqs.h:106
SharedPtr< DataStream > DataStreamPtr
Definition: CorePrereqs.h:365
Child class of ConfigFile, used to store the settings of the game.
Definition: SettingsConfigFile.h:59
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Definition: CorePrereqs.h:302
CommandEvaluation is used to gather information about a command and to evaluate its arguments...
Definition: CommandEvaluation.h:80
Definition: CoreStaticInitializationHandler.h:38
Definition: StaticallyInitializedInstance.h:36
Value
Definition: CorePrereqs.h:124
Maps mouse, keyboard and joy stick input to command strings and executes them.
Definition: KeyBinder.h:59
Base class of ClassScopedSingletonWrapper.
Definition: ScopedSingletonWrapper.h:59
Definition: InputCommands.h:43
Mode
Definition: CorePrereqs.h:102
Definition: CorePrereqs.h:104
callback class that executes lua code
Definition: LuaState.h:58
The Identifier is used to identify the class of an object and to store information about the class...
Definition: Identifier.h:109
Typedefs and definitions of ExecutorPtr, ExecutorStaticPtr, and ExecutorMemberPtr.
Definition: InputCommands.h:75
This listener is used to inform weak pointers if an object of type Destroyable gets destroyed...
Definition: Destroyable.h:97
Definition: InputCommands.h:55
Definition: Thread.h:45
ORX_FORCEINLINE T orxonox_cast(U *source)
Casts on object of type Identifiable to any derived type that is registered in the class hierarchy...
Definition: Identifier.h:485
Event argument for key events.
Definition: InputHandler.h:76
Definition: InputPrereqs.h:78
Definition: PluginManager.h:41
The ObjectList contains all objects of the given class.
Definition: CorePrereqs.h:204
Definition: Context.h:45
Definition: KeyDetector.h:39
Main class responsible for running the game.
Definition: Game.h:81
static constexpr Type CONSOLE_COMMAND
Definition: CorePrereqs.h:97
FunctorMember< void > FunctorStatic
FunctorStatic is just a typedef of FunctorMember with T = void.
Definition: Functor.h:353
An implementation of a tree to manage game states.
Definition: GameState.h:61
Definition: CorePrereqs.h:409
The ConfigurablePaths class is a singleton used to configure different paths.
Definition: ConfigurablePaths.h:55
XML text.
Definition: tinyxml.h:1221
InputStates allow you to customise the input event targets at runtime.
Definition: InputState.h:83
Classes must inherit from this class if they should be used with StrongPtr or WeakPtr.
Definition: Destroyable.h:47
Represents a section in a config file.
Definition: ConfigFileSection.h:54
Definition: GlowMaterialListener.h:9
Resource holding data about a dynamic library.
Definition: DynLib.h:72
Definition: HalfAxis.h:45
The element is a container class.
Definition: tinyxml.h:961
int Type
Definition: CorePrereqs.h:91
static constexpr Value GRAPHICS
Definition: CorePrereqs.h:86
Definition: tinystr.h:298
Definition: ThreadPool.h:48
The list-element of the ObjectListBase.
Definition: ObjectListBase.h:52
Definition: TclThreadManager.h:51
Definition: CorePrereqs.h:365
The ScopeManager stores the variables of the Scope templates in a statically linked context...
Definition: ScopeManager.h:56
Definition: XMLNameListener.h:42
Definition: CorePrereqs.h:243
An interface, used to get a notification if the state of the Shell changes.
Definition: Shell.h:58
The ClassTreeMaskObjectIterator iterates through all objects of the classes that were included by a C...
Definition: ClassTreeMask.h:274
Definition: InputBuffer.h:76
std::string LanguageEntryLabel
Definition: CorePrereqs.h:141
Definition: InputCommands.h:102
Definition: CorePrereqs.h:115
static constexpr uint32_t OBJECTID_UNKNOWN
Definition: CorePrereqs.h:71
This class is used in argument completion lists and contains up to three different strings...
Definition: ArgumentCompletionListElement.h:66
A struct containing all information about a Tcl-interpreter.
Definition: TclThreadManager.cc:66
A scope for a given template argument is either active or not.
Definition: CorePrereqs.h:219
Definition: CorePrereqs.h:362
Definition: CorePrereqs.h:117
Definition: InputPrereqs.h:80
Base-class of all factories.
Definition: ClassFactory.h:52
The ClassTreeMaskNode is a node in the internal tree of the ClassTreeMask, containing the rules of th...
Definition: ClassTreeMask.h:90
The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
Definition: SubclassIdentifier.h:90
Definition: IOConsolePOSIX.h:50
int Value
Definition: CorePrereqs.h:82
Definition: Button.h:46
Handles the KeyBinders and supplies them throughout the game.
Definition: KeyBinderManager.h:55
ObjectListIterator<T> allows to iterate through the ObjectList of class T.
Definition: CorePrereqs.h:210
Definition: XMLFile.h:44
FunctorPointer is a child class of FunctorMember and extends it with a function-pointer (or a functio...
Definition: Functor.h:369
static constexpr Type SCOPED_SINGLETON_WRAPPER
Definition: CorePrereqs.h:95
Container class for a command line argument of any type supported by MultiType.
Definition: CommandLineParser.h:65
This class executes an argument completion function and returns a list of the possible arguments...
Definition: ArgumentCompleter.h:70
Manages the input devices (mouse, keyboard, joy sticks) and the input states.
Definition: InputManager.h:66
Definition: GraphicsManager.cc:86
The IRC class creates a Tcl-thread (see TclThreadManager) and connects to an IRC server.
Definition: IRC.h:48
This class represents an entry in the config file.
Definition: ConfigFileEntry.h:49
Abstract base class for all input devices (mouse, keyboard and joy sticks).
Definition: InputDevice.h:57
Manager for Dynamic-loading Libraries.
Definition: DynLibManager.h:55