[682] | 1 | /* |
---|
| 2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
[1502] | 3 | * > www.orxonox.net < |
---|
[682] | 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 | /** |
---|
[5929] | 30 | @file |
---|
| 31 | @brief |
---|
| 32 | Shared library macros, enums, constants and forward declarations for the core library |
---|
[871] | 33 | */ |
---|
[682] | 34 | |
---|
| 35 | #ifndef _CorePrereqs_H__ |
---|
| 36 | #define _CorePrereqs_H__ |
---|
| 37 | |
---|
[2710] | 38 | #include "OrxonoxConfig.h" |
---|
[7169] | 39 | #include <boost/version.hpp> |
---|
[1062] | 40 | |
---|
[728] | 41 | //----------------------------------------------------------------------- |
---|
| 42 | // Shared library settings |
---|
| 43 | //----------------------------------------------------------------------- |
---|
[5929] | 44 | |
---|
[2710] | 45 | #if defined(ORXONOX_PLATFORM_WINDOWS) && !defined( CORE_STATIC_BUILD ) |
---|
[728] | 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 |
---|
[8351] | 55 | # define _CorePrivate |
---|
| 56 | #elif defined (ORXONOX_GCC_VISIBILITY) |
---|
[728] | 57 | # define _CoreExport __attribute__ ((visibility("default"))) |
---|
[8351] | 58 | # define _CorePrivate __attribute__ ((visibility("hidden"))) |
---|
[728] | 59 | #else |
---|
| 60 | # define _CoreExport |
---|
[8351] | 61 | # define _CorePrivate |
---|
[728] | 62 | #endif |
---|
[682] | 63 | |
---|
[5929] | 64 | //----------------------------------------------------------------------- |
---|
| 65 | // Constants |
---|
| 66 | //----------------------------------------------------------------------- |
---|
[728] | 67 | |
---|
[5929] | 68 | namespace orxonox |
---|
| 69 | { |
---|
| 70 | static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1); |
---|
| 71 | } |
---|
| 72 | |
---|
[682] | 73 | //----------------------------------------------------------------------- |
---|
[5929] | 74 | // Enums |
---|
[728] | 75 | //----------------------------------------------------------------------- |
---|
[5929] | 76 | |
---|
[728] | 77 | namespace orxonox |
---|
[684] | 78 | { |
---|
[10407] | 79 | namespace ScopeID |
---|
| 80 | { |
---|
[10464] | 81 | typedef int Value; |
---|
| 82 | |
---|
[10407] | 83 | //!A list of available scopes for the Scope template. |
---|
[10464] | 84 | static const Value ROOT = 1; |
---|
| 85 | static const Value GRAPHICS = 2; |
---|
[10407] | 86 | } |
---|
| 87 | |
---|
[3196] | 88 | namespace XMLPort |
---|
[1052] | 89 | { |
---|
[3196] | 90 | enum Mode |
---|
| 91 | { |
---|
[5929] | 92 | NOP, |
---|
[3196] | 93 | LoadObject, |
---|
| 94 | SaveObject, |
---|
| 95 | ExpandObject |
---|
| 96 | }; |
---|
| 97 | } |
---|
[1052] | 98 | |
---|
[6536] | 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 | |
---|
[3196] | 110 | namespace KeybindMode |
---|
[1502] | 111 | { |
---|
[3280] | 112 | enum Value |
---|
[3196] | 113 | { |
---|
| 114 | OnPress, |
---|
| 115 | OnHold, |
---|
| 116 | OnRelease, |
---|
[9978] | 117 | OnPressAndRelease, |
---|
[3196] | 118 | None |
---|
| 119 | }; |
---|
[1502] | 120 | }; |
---|
[5929] | 121 | } |
---|
[1349] | 122 | |
---|
[5929] | 123 | //----------------------------------------------------------------------- |
---|
| 124 | // Forward declarations |
---|
| 125 | //----------------------------------------------------------------------- |
---|
| 126 | |
---|
| 127 | namespace orxonox |
---|
| 128 | { |
---|
[3196] | 129 | typedef std::string LanguageEntryLabel; |
---|
[1024] | 130 | |
---|
[7271] | 131 | template <class T, class U> |
---|
| 132 | T orxonox_cast(U*); |
---|
| 133 | |
---|
[10509] | 134 | class ApplicationPaths; |
---|
[3196] | 135 | class BaseObject; |
---|
| 136 | template <class T> |
---|
| 137 | class ClassFactory; |
---|
| 138 | template <class T> |
---|
[9667] | 139 | class ClassFactoryWithContext; |
---|
| 140 | template <class T> |
---|
[3196] | 141 | class ClassIdentifier; |
---|
| 142 | class ClassTreeMask; |
---|
| 143 | class ClassTreeMaskIterator; |
---|
| 144 | class ClassTreeMaskNode; |
---|
| 145 | class ClassTreeMaskObjectIterator; |
---|
[6021] | 146 | class CommandLineParser; |
---|
[3196] | 147 | class CommandLineArgument; |
---|
| 148 | class ConfigFile; |
---|
| 149 | class ConfigFileEntry; |
---|
| 150 | class ConfigFileEntryComment; |
---|
| 151 | class ConfigFileEntryValue; |
---|
| 152 | class ConfigFileManager; |
---|
| 153 | class ConfigFileSection; |
---|
[9667] | 154 | class Configurable; |
---|
[10509] | 155 | class ConfigurablePaths; |
---|
[3196] | 156 | class ConfigValueContainer; |
---|
[9667] | 157 | class Context; |
---|
[3196] | 158 | class Core; |
---|
[10479] | 159 | class CoreConfig; |
---|
[10532] | 160 | class CoreStaticInitializationHandler; |
---|
[9667] | 161 | class Destroyable; |
---|
[10419] | 162 | class DestroyLaterManager; |
---|
[7849] | 163 | class DestructionListener; |
---|
[5693] | 164 | class DynLib; |
---|
| 165 | class DynLibManager; |
---|
[3196] | 166 | struct Event; |
---|
[5929] | 167 | class EventState; |
---|
[3196] | 168 | class Factory; |
---|
[5929] | 169 | class Game; |
---|
[10479] | 170 | class GameConfig; |
---|
[5929] | 171 | class GameState; |
---|
| 172 | struct GameStateInfo; |
---|
| 173 | struct GameStateTreeNode; |
---|
[3370] | 174 | class GraphicsManager; |
---|
| 175 | class GUIManager; |
---|
[9667] | 176 | class Identifiable; |
---|
[3196] | 177 | class Identifier; |
---|
| 178 | template <class T> |
---|
| 179 | class Iterator; |
---|
| 180 | class Language; |
---|
[9667] | 181 | class Listable; |
---|
[10392] | 182 | class Loader; |
---|
[7284] | 183 | class LuaFunctor; |
---|
[5695] | 184 | class LuaState; |
---|
| 185 | class MemoryArchive; |
---|
| 186 | class MemoryArchiveFactory; |
---|
[10342] | 187 | class ModuleInstance; |
---|
[3196] | 188 | class Namespace; |
---|
| 189 | class NamespaceNode; |
---|
| 190 | template <class T> |
---|
| 191 | class ObjectList; |
---|
| 192 | class ObjectListBase; |
---|
| 193 | class ObjectListBaseElement; |
---|
| 194 | template <class T> |
---|
| 195 | class ObjectListElement; |
---|
| 196 | template <class T> |
---|
| 197 | class ObjectListIterator; |
---|
[3370] | 198 | class OgreWindowEventListener; |
---|
[3196] | 199 | class OrxonoxClass; |
---|
[9667] | 200 | class OrxonoxInterface; |
---|
[5695] | 201 | struct ResourceInfo; |
---|
[10407] | 202 | template <ScopeID::Value> |
---|
| 203 | class Scope; |
---|
[10458] | 204 | class ScopeManager; |
---|
| 205 | class ScopedSingletonWrapper; |
---|
[6536] | 206 | class SettingsConfigFile; |
---|
[3196] | 207 | template <class T> |
---|
[5929] | 208 | class SmartPtr; |
---|
[10342] | 209 | class StaticallyInitializedInstance; |
---|
[10531] | 210 | class StaticInitializationHandler; |
---|
| 211 | class StaticInitializationManager; |
---|
[5929] | 212 | template <class T> |
---|
[3196] | 213 | class SubclassIdentifier; |
---|
| 214 | class Template; |
---|
[5929] | 215 | class Thread; |
---|
| 216 | class ThreadPool; |
---|
[10413] | 217 | class UpdateListener; |
---|
[8079] | 218 | class ViewportEventListener; |
---|
[5929] | 219 | template <class T> |
---|
| 220 | class WeakPtr; |
---|
[3327] | 221 | class WindowEventListener; |
---|
[3196] | 222 | class XMLFile; |
---|
| 223 | class XMLNameListener; |
---|
| 224 | template <class T, class O> |
---|
| 225 | class XMLPortClassObjectContainer; |
---|
| 226 | template <class T> |
---|
| 227 | class XMLPortClassParamContainer; |
---|
| 228 | class XMLPortObjectContainer; |
---|
| 229 | class XMLPortParamContainer; |
---|
[1219] | 230 | |
---|
[7284] | 231 | // Command |
---|
| 232 | class ArgumentCompleter; |
---|
| 233 | class ArgumentCompletionListElement; |
---|
| 234 | class CommandEvaluation; |
---|
| 235 | class ConsoleCommand; |
---|
[10346] | 236 | class ConsoleCommandManager; |
---|
[7284] | 237 | class Executor; |
---|
| 238 | template <class T> |
---|
| 239 | class ExecutorMember; |
---|
| 240 | class ExecutorStatic; |
---|
| 241 | class Functor; |
---|
| 242 | template <class O> |
---|
| 243 | class FunctorMember; |
---|
| 244 | typedef FunctorMember<void> FunctorStatic; |
---|
| 245 | template <class F, class O> |
---|
| 246 | class FunctorPointer; |
---|
| 247 | class IOConsole; |
---|
| 248 | class IRC; |
---|
| 249 | class Shell; |
---|
| 250 | class ShellListener; |
---|
| 251 | class TclBind; |
---|
| 252 | struct TclInterpreterBundle; |
---|
| 253 | template <class T> |
---|
| 254 | class TclThreadList; |
---|
| 255 | class TclThreadManager; |
---|
| 256 | |
---|
[5929] | 257 | // Input |
---|
[3196] | 258 | class BaseCommand; |
---|
| 259 | class BufferedParamCommand; |
---|
| 260 | class Button; |
---|
| 261 | class HalfAxis; |
---|
| 262 | class InputBuffer; |
---|
[3327] | 263 | class InputDevice; |
---|
| 264 | template <class Traits> |
---|
| 265 | class InputDeviceTemplated; |
---|
| 266 | class InputHandler; |
---|
[3196] | 267 | class InputManager; |
---|
| 268 | class InputState; |
---|
[5929] | 269 | struct InputStatePriority; |
---|
| 270 | class JoyStickQuantityListener; |
---|
[3327] | 271 | class JoyStick; |
---|
[5929] | 272 | class KeyBinder; |
---|
| 273 | class KeyBinderManager; |
---|
[3327] | 274 | class Keyboard; |
---|
[3196] | 275 | class KeyDetector; |
---|
[5929] | 276 | class KeyEvent; |
---|
| 277 | class Mouse; |
---|
[3196] | 278 | class ParamCommand; |
---|
| 279 | class SimpleCommand; |
---|
[682] | 280 | } |
---|
| 281 | |
---|
[7284] | 282 | #include "command/FunctorPtr.h" |
---|
| 283 | #include "command/ExecutorPtr.h" |
---|
| 284 | |
---|
[3196] | 285 | // CppTcl |
---|
| 286 | namespace Tcl |
---|
| 287 | { |
---|
| 288 | class interpreter; |
---|
| 289 | class object; |
---|
| 290 | } |
---|
| 291 | |
---|
| 292 | // Boost |
---|
[3304] | 293 | namespace boost |
---|
[3318] | 294 | { |
---|
[7169] | 295 | #if (BOOST_VERSION < 104400) |
---|
[8351] | 296 | |
---|
[3304] | 297 | namespace filesystem |
---|
| 298 | { |
---|
| 299 | struct path_traits; |
---|
| 300 | template <class String, class Traits> class basic_path; |
---|
| 301 | typedef basic_path<std::string, path_traits> path; |
---|
| 302 | } |
---|
[8351] | 303 | |
---|
[9703] | 304 | #elif (BOOST_VERSION < 105000) |
---|
[8351] | 305 | |
---|
| 306 | # if BOOST_FILESYSTEM_VERSION == 2 |
---|
[7169] | 307 | namespace filesystem2 |
---|
| 308 | { |
---|
| 309 | struct path_traits; |
---|
| 310 | template <class String, class Traits> class basic_path; |
---|
| 311 | typedef basic_path<std::string, path_traits> path; |
---|
| 312 | } |
---|
| 313 | namespace filesystem |
---|
| 314 | { |
---|
| 315 | using filesystem2::basic_path; |
---|
| 316 | using filesystem2::path_traits; |
---|
| 317 | using filesystem2::path; |
---|
| 318 | } |
---|
[8351] | 319 | # elif BOOST_FILESYSTEM_VERSION == 3 |
---|
| 320 | namespace filesystem3 |
---|
| 321 | { |
---|
| 322 | class path; |
---|
| 323 | } |
---|
| 324 | namespace filesystem |
---|
| 325 | { |
---|
| 326 | using filesystem3::path; |
---|
| 327 | } |
---|
| 328 | # endif |
---|
| 329 | |
---|
| 330 | #else |
---|
| 331 | |
---|
| 332 | namespace filesystem |
---|
| 333 | { |
---|
| 334 | class path; |
---|
| 335 | } |
---|
| 336 | |
---|
[7169] | 337 | #endif |
---|
[8351] | 338 | |
---|
[3304] | 339 | class thread; |
---|
| 340 | class mutex; |
---|
[3318] | 341 | class shared_mutex; |
---|
| 342 | class condition_variable; |
---|
[3304] | 343 | } |
---|
[3196] | 344 | |
---|
[5695] | 345 | // Ogre |
---|
| 346 | namespace Ogre |
---|
| 347 | { |
---|
| 348 | class DataStream; |
---|
| 349 | template <class T> class SharedPtr; |
---|
| 350 | typedef SharedPtr<DataStream> DataStreamPtr; |
---|
| 351 | } |
---|
| 352 | namespace orxonox |
---|
| 353 | { |
---|
| 354 | // Import the Ogre::DataStream |
---|
| 355 | using Ogre::DataStream; |
---|
| 356 | using Ogre::DataStreamPtr; |
---|
| 357 | } |
---|
| 358 | |
---|
[3370] | 359 | // CEGUI |
---|
| 360 | namespace CEGUI |
---|
| 361 | { |
---|
| 362 | class DefaultLogger; |
---|
| 363 | class Logger; |
---|
| 364 | class LuaScriptModule; |
---|
| 365 | |
---|
[8351] | 366 | #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7 |
---|
[3370] | 367 | class OgreCEGUIRenderer; |
---|
| 368 | class OgreCEGUIResourceProvider; |
---|
| 369 | class OgreCEGUITexture; |
---|
[8351] | 370 | #else |
---|
| 371 | class OgreRenderer; |
---|
| 372 | class OgreResourceProvider; |
---|
| 373 | class OgreImageCodec; |
---|
| 374 | #endif |
---|
[3370] | 375 | } |
---|
| 376 | |
---|
| 377 | // Lua |
---|
| 378 | struct lua_State; |
---|
| 379 | |
---|
[3196] | 380 | // TinyXML and TinyXML++ |
---|
| 381 | class TiXmlString; |
---|
| 382 | class TiXmlOutStream; |
---|
| 383 | class TiXmlNode; |
---|
| 384 | class TiXmlHandle; |
---|
| 385 | class TiXmlDocument; |
---|
| 386 | class TiXmlElement; |
---|
| 387 | class TiXmlComment; |
---|
| 388 | class TiXmlUnknown; |
---|
| 389 | class TiXmlAttribute; |
---|
| 390 | class TiXmlText; |
---|
| 391 | class TiXmlDeclaration; |
---|
| 392 | class TiXmlParsingData; |
---|
| 393 | namespace ticpp |
---|
| 394 | { |
---|
| 395 | class Document; |
---|
| 396 | class Element; |
---|
| 397 | class Declaration; |
---|
| 398 | class StylesheetReference; |
---|
| 399 | class Text; |
---|
| 400 | class Comment; |
---|
| 401 | class Attribute; |
---|
| 402 | } |
---|
| 403 | namespace orxonox |
---|
| 404 | { |
---|
| 405 | using ticpp::Element; |
---|
| 406 | } |
---|
| 407 | |
---|
[682] | 408 | #endif /* _CorePrereqs_H__ */ |
---|