Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

moved config values and all related functions from Game and Core to GameConfig and CoreConfig respectively. this ensures that no framework features are used by Game and Core before Core itself initialized the framework.

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