Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core6/src/libraries/core/CorePrereqs.h @ 9577

Last change on this file since 9577 was 9577, checked in by landauf, 11 years ago

moved setConfigValues() from OrxonoxClass to Configurable. This new base class it pretty much useless at the moment, but inheriting from it rather than from OrxonoxClass expresses that you're only interested in the config value facilities

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