Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10476 was 10464, checked in by landauf, 10 years ago

define ScopeID as integer constants instead of an enum. this allows to extend it and add new scopes outside of core.

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