Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

added helper class for module initialization

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