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