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