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