Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core7/src/libraries/core/CorePrereqs.h @ 10532

Last change on this file since 10532 was 10532, checked in by landauf, 9 years ago

use CoreStaticInitializationHandler to initialize core instances

  • Property svn:eol-style set to native
File size: 9.2 KB
Line 
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
29/**
30@file
31@brief
32    Shared library macros, enums, constants and forward declarations for the core library
33*/
34
35#ifndef _CorePrereqs_H__
36#define _CorePrereqs_H__
37
38#include "OrxonoxConfig.h"
39#include <boost/version.hpp>
40
41//-----------------------------------------------------------------------
42// Shared library settings
43//-----------------------------------------------------------------------
44
45#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( CORE_STATIC_BUILD )
46#  ifdef CORE_SHARED_BUILD
47#    define _CoreExport __declspec(dllexport)
48#  else
49#    if defined( __MINGW32__ )
50#      define _CoreExport
51#    else
52#      define _CoreExport __declspec(dllimport)
53#    endif
54#  endif
55#  define _CorePrivate
56#elif defined (ORXONOX_GCC_VISIBILITY)
57#  define _CoreExport  __attribute__ ((visibility("default")))
58#  define _CorePrivate __attribute__ ((visibility("hidden")))
59#else
60#  define _CoreExport
61#  define _CorePrivate
62#endif
63
64//-----------------------------------------------------------------------
65// Constants
66//-----------------------------------------------------------------------
67
68namespace orxonox
69{
70    static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1);
71}
72
73//-----------------------------------------------------------------------
74// Enums
75//-----------------------------------------------------------------------
76
77namespace orxonox
78{
79    namespace ScopeID
80    {
81        typedef int Value;
82
83        //!A list of available scopes for the Scope template.
84        static const Value ROOT = 1;
85        static const Value GRAPHICS = 2;
86    }
87
88    namespace XMLPort
89    {
90        enum Mode
91        {
92            NOP,
93            LoadObject,
94            SaveObject,
95            ExpandObject
96        };
97    }
98
99    namespace ConfigFileType
100    {
101        enum Value
102        {
103            Settings,
104            JoyStickCalibration,
105            CommandHistory
106            // Don't forget to adjust the array size in the ConfigFileManager when adding a new entry here!
107        };
108    }
109
110    namespace KeybindMode
111    {
112        enum Value
113        {
114            OnPress,
115            OnHold,
116            OnRelease,
117            OnPressAndRelease,
118            None
119        };
120    };
121}
122
123//-----------------------------------------------------------------------
124// Forward declarations
125//-----------------------------------------------------------------------
126
127namespace orxonox
128{
129    typedef std::string LanguageEntryLabel;
130
131    template <class T, class U>
132    T orxonox_cast(U*);
133
134    class ApplicationPaths;
135    class BaseObject;
136    template <class T>
137    class ClassFactory;
138    template <class T>
139    class ClassFactoryWithContext;
140    template <class T>
141    class ClassIdentifier;
142    class ClassTreeMask;
143    class ClassTreeMaskIterator;
144    class ClassTreeMaskNode;
145    class ClassTreeMaskObjectIterator;
146    class CommandLineParser;
147    class CommandLineArgument;
148    class ConfigFile;
149    class ConfigFileEntry;
150    class ConfigFileEntryComment;
151    class ConfigFileEntryValue;
152    class ConfigFileManager;
153    class ConfigFileSection;
154    class Configurable;
155    class ConfigurablePaths;
156    class ConfigValueContainer;
157    class Context;
158    class Core;
159    class CoreConfig;
160    class CoreStaticInitializationHandler;
161    class Destroyable;
162    class DestroyLaterManager;
163    class DestructionListener;
164    class DynLib;
165    class DynLibManager;
166    struct Event;
167    class EventState;
168    class Factory;
169    class Game;
170    class GameConfig;
171    class GameState;
172    struct GameStateInfo;
173    struct GameStateTreeNode;
174    class GraphicsManager;
175    class GUIManager;
176    class Identifiable;
177    class Identifier;
178    template <class T>
179    class Iterator;
180    class Language;
181    class Listable;
182    class Loader;
183    class LuaFunctor;
184    class LuaState;
185    class MemoryArchive;
186    class MemoryArchiveFactory;
187    class ModuleInstance;
188    class Namespace;
189    class NamespaceNode;
190    template <class T>
191    class ObjectList;
192    class ObjectListBase;
193    class ObjectListBaseElement;
194    template <class T>
195    class ObjectListElement;
196    template <class T>
197    class ObjectListIterator;
198    class OgreWindowEventListener;
199    class OrxonoxClass;
200    class OrxonoxInterface;
201    struct ResourceInfo;
202    template <ScopeID::Value>
203    class Scope;
204    class ScopeManager;
205    class ScopedSingletonWrapper;
206    class SettingsConfigFile;
207    template <class T>
208    class SmartPtr;
209    class StaticallyInitializedInstance;
210    class StaticInitializationHandler;
211    class StaticInitializationManager;
212    template <class T>
213    class SubclassIdentifier;
214    class Template;
215    class Thread;
216    class ThreadPool;
217    class UpdateListener;
218    class ViewportEventListener;
219    template <class T>
220    class WeakPtr;
221    class WindowEventListener;
222    class XMLFile;
223    class XMLNameListener;
224    template <class T, class O>
225    class XMLPortClassObjectContainer;
226    template <class T>
227    class XMLPortClassParamContainer;
228    class XMLPortObjectContainer;
229    class XMLPortParamContainer;
230
231    // Command
232    class ArgumentCompleter;
233    class ArgumentCompletionListElement;
234    class CommandEvaluation;
235    class ConsoleCommand;
236    class ConsoleCommandManager;
237    class Executor;
238    template <class T>
239    class ExecutorMember;
240    class ExecutorStatic;
241    class Functor;
242    template <class O>
243    class FunctorMember;
244    typedef FunctorMember<void> FunctorStatic;
245    template <class F, class O>
246    class FunctorPointer;
247    class IOConsole;
248    class IRC;
249    class Shell;
250    class ShellListener;
251    class TclBind;
252    struct TclInterpreterBundle;
253    template <class T>
254    class TclThreadList;
255    class TclThreadManager;
256
257    // Input
258    class BaseCommand;
259    class BufferedParamCommand;
260    class Button;
261    class HalfAxis;
262    class InputBuffer;
263    class InputDevice;
264    template <class Traits>
265    class InputDeviceTemplated;
266    class InputHandler;
267    class InputManager;
268    class InputState;
269    struct InputStatePriority;
270    class JoyStickQuantityListener;
271    class JoyStick;
272    class KeyBinder;
273    class KeyBinderManager;
274    class Keyboard;
275    class KeyDetector;
276    class KeyEvent;
277    class Mouse;
278    class ParamCommand;
279    class SimpleCommand;
280}
281
282#include "command/FunctorPtr.h"
283#include "command/ExecutorPtr.h"
284
285// CppTcl
286namespace Tcl
287{
288    class interpreter;
289    class object;
290}
291
292// Boost
293namespace boost
294{
295#if (BOOST_VERSION < 104400)
296
297    namespace filesystem
298    {
299        struct path_traits;
300        template <class String, class Traits> class basic_path;
301        typedef basic_path<std::string, path_traits> path;
302    }
303
304#elif (BOOST_VERSION < 105000)
305
306# if BOOST_FILESYSTEM_VERSION == 2
307    namespace filesystem2
308    {
309        struct path_traits;
310        template <class String, class Traits> class basic_path;
311        typedef basic_path<std::string, path_traits> path;
312    }
313    namespace filesystem
314    {
315        using filesystem2::basic_path;
316        using filesystem2::path_traits;
317        using filesystem2::path;
318    }
319# elif BOOST_FILESYSTEM_VERSION == 3
320    namespace filesystem3
321    {
322        class path;
323    }
324    namespace filesystem
325    {
326        using filesystem3::path;
327    }
328# endif
329
330#else
331
332    namespace filesystem
333    {
334        class path;
335    }
336
337#endif
338
339    class thread;
340    class mutex;
341    class shared_mutex;
342    class condition_variable;
343}
344
345// Ogre
346namespace Ogre
347{
348    class DataStream;
349    template <class T> class SharedPtr;
350    typedef SharedPtr<DataStream> DataStreamPtr;
351}
352namespace orxonox
353{
354    // Import the Ogre::DataStream
355    using Ogre::DataStream;
356    using Ogre::DataStreamPtr;
357}
358
359// CEGUI
360namespace CEGUI
361{
362    class DefaultLogger;
363    class Logger;
364    class LuaScriptModule;
365
366#if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7
367    class OgreCEGUIRenderer;
368    class OgreCEGUIResourceProvider;
369    class OgreCEGUITexture;
370#else
371    class OgreRenderer;
372    class OgreResourceProvider;
373    class OgreImageCodec;
374#endif
375}
376
377// Lua
378struct lua_State;
379
380// TinyXML and TinyXML++
381class TiXmlString;
382class TiXmlOutStream;
383class TiXmlNode;
384class TiXmlHandle;
385class TiXmlDocument;
386class TiXmlElement;
387class TiXmlComment;
388class TiXmlUnknown;
389class TiXmlAttribute;
390class TiXmlText;
391class TiXmlDeclaration;
392class TiXmlParsingData;
393namespace ticpp
394{
395    class Document;
396    class Element;
397    class Declaration;
398    class StylesheetReference;
399    class Text;
400    class Comment;
401    class Attribute;
402}
403namespace orxonox
404{
405    using ticpp::Element;
406}
407
408#endif /* _CorePrereqs_H__ */
Note: See TracBrowser for help on using the repository browser.