Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

statically initialized instances are now registered with a type. CoreStaticInitializationHandler initializes all instances in core, NetworkStaticInitializationHandler initializes all instances in network.

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