Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

moved Scope and ScopedSingletonManager from util to core.
TODO I had to disable two tests in ScopeTest.cc because now that it runs in the core library, there are too many singletons which get loaded in graphics scope (with too many dependencies). this should be fixed

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