Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

moved functions and attributes needed to safely destroy objects from OrxonoxClass to Destroyable

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