[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> |
---|
[7960] | 40 | #include <CEGUIVersion.h> |
---|
[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 |
---|
[8071] | 56 | # define _CorePrivate |
---|
| 57 | #elif defined (ORXONOX_GCC_VISIBILITY) |
---|
[728] | 58 | # define _CoreExport __attribute__ ((visibility("default"))) |
---|
[8071] | 59 | # define _CorePrivate __attribute__ ((visibility("hidden"))) |
---|
[728] | 60 | #else |
---|
| 61 | # define _CoreExport |
---|
[8071] | 62 | # define _CorePrivate |
---|
[728] | 63 | #endif |
---|
[682] | 64 | |
---|
[5929] | 65 | //----------------------------------------------------------------------- |
---|
| 66 | // Constants |
---|
| 67 | //----------------------------------------------------------------------- |
---|
[728] | 68 | |
---|
[5929] | 69 | namespace orxonox |
---|
| 70 | { |
---|
| 71 | static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1); |
---|
| 72 | } |
---|
| 73 | |
---|
[682] | 74 | //----------------------------------------------------------------------- |
---|
[5929] | 75 | // Enums |
---|
[728] | 76 | //----------------------------------------------------------------------- |
---|
[5929] | 77 | |
---|
[728] | 78 | namespace orxonox |
---|
[684] | 79 | { |
---|
[3196] | 80 | namespace XMLPort |
---|
[1052] | 81 | { |
---|
[3196] | 82 | enum Mode |
---|
| 83 | { |
---|
[5929] | 84 | NOP, |
---|
[3196] | 85 | LoadObject, |
---|
| 86 | SaveObject, |
---|
| 87 | ExpandObject |
---|
| 88 | }; |
---|
| 89 | } |
---|
[1052] | 90 | |
---|
[6536] | 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 | |
---|
[3196] | 102 | namespace KeybindMode |
---|
[1502] | 103 | { |
---|
[3280] | 104 | enum Value |
---|
[3196] | 105 | { |
---|
| 106 | OnPress, |
---|
| 107 | OnHold, |
---|
| 108 | OnRelease, |
---|
| 109 | None |
---|
| 110 | }; |
---|
[1502] | 111 | }; |
---|
[5929] | 112 | } |
---|
[1349] | 113 | |
---|
[5929] | 114 | //----------------------------------------------------------------------- |
---|
| 115 | // Forward declarations |
---|
| 116 | //----------------------------------------------------------------------- |
---|
| 117 | |
---|
| 118 | namespace orxonox |
---|
| 119 | { |
---|
[3196] | 120 | typedef std::string LanguageEntryLabel; |
---|
[1024] | 121 | |
---|
[7271] | 122 | template <class T, class U> |
---|
| 123 | T orxonox_cast(U*); |
---|
| 124 | |
---|
[3196] | 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; |
---|
[6021] | 134 | class CommandLineParser; |
---|
[3196] | 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; |
---|
[7849] | 144 | class DestructionListener; |
---|
[5693] | 145 | class DynLib; |
---|
| 146 | class DynLibManager; |
---|
[3196] | 147 | struct Event; |
---|
[5929] | 148 | class EventState; |
---|
[3196] | 149 | class Factory; |
---|
[5929] | 150 | class Game; |
---|
| 151 | class GameState; |
---|
| 152 | struct GameStateInfo; |
---|
| 153 | struct GameStateTreeNode; |
---|
[3370] | 154 | class GraphicsManager; |
---|
| 155 | class GUIManager; |
---|
[3196] | 156 | class Identifier; |
---|
| 157 | template <class T> |
---|
| 158 | class Iterator; |
---|
| 159 | class Language; |
---|
[7284] | 160 | class LuaFunctor; |
---|
[5695] | 161 | class LuaState; |
---|
| 162 | class MemoryArchive; |
---|
| 163 | class MemoryArchiveFactory; |
---|
[3196] | 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; |
---|
[3370] | 176 | class OgreWindowEventListener; |
---|
[3196] | 177 | class OrxonoxClass; |
---|
[5929] | 178 | class PathConfig; |
---|
[5695] | 179 | struct ResourceInfo; |
---|
[6536] | 180 | class SettingsConfigFile; |
---|
[3196] | 181 | template <class T> |
---|
[5929] | 182 | class SmartPtr; |
---|
| 183 | template <class T> |
---|
[3196] | 184 | class SubclassIdentifier; |
---|
| 185 | class Template; |
---|
[5929] | 186 | class Thread; |
---|
| 187 | class ThreadPool; |
---|
| 188 | template <class T> |
---|
| 189 | class WeakPtr; |
---|
[3327] | 190 | class WindowEventListener; |
---|
[3196] | 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; |
---|
[1219] | 199 | |
---|
[7284] | 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 | |
---|
[5929] | 225 | // Input |
---|
[3196] | 226 | class BaseCommand; |
---|
| 227 | class BufferedParamCommand; |
---|
| 228 | class Button; |
---|
| 229 | class HalfAxis; |
---|
| 230 | class InputBuffer; |
---|
[3327] | 231 | class InputDevice; |
---|
| 232 | template <class Traits> |
---|
| 233 | class InputDeviceTemplated; |
---|
| 234 | class InputHandler; |
---|
[3196] | 235 | class InputManager; |
---|
| 236 | class InputState; |
---|
[5929] | 237 | struct InputStatePriority; |
---|
| 238 | class JoyStickQuantityListener; |
---|
[3327] | 239 | class JoyStick; |
---|
[5929] | 240 | class KeyBinder; |
---|
| 241 | class KeyBinderManager; |
---|
[3327] | 242 | class Keyboard; |
---|
[3196] | 243 | class KeyDetector; |
---|
[5929] | 244 | class KeyEvent; |
---|
| 245 | class Mouse; |
---|
[3196] | 246 | class ParamCommand; |
---|
| 247 | class SimpleCommand; |
---|
[682] | 248 | } |
---|
| 249 | |
---|
[7284] | 250 | #include "command/FunctorPtr.h" |
---|
| 251 | #include "command/ExecutorPtr.h" |
---|
| 252 | |
---|
[3196] | 253 | // CppTcl |
---|
| 254 | namespace Tcl |
---|
| 255 | { |
---|
| 256 | class interpreter; |
---|
| 257 | class object; |
---|
| 258 | } |
---|
| 259 | |
---|
| 260 | // Boost |
---|
[3304] | 261 | namespace boost |
---|
[3318] | 262 | { |
---|
[8225] | 263 | #if (BOOST_VERSION < 104400) |
---|
| 264 | |
---|
[3304] | 265 | namespace filesystem |
---|
| 266 | { |
---|
| 267 | struct path_traits; |
---|
| 268 | template <class String, class Traits> class basic_path; |
---|
| 269 | typedef basic_path<std::string, path_traits> path; |
---|
| 270 | } |
---|
[8225] | 271 | |
---|
| 272 | #elif (BOOST_VERSION < 104800) |
---|
| 273 | |
---|
| 274 | # if BOOST_FILESYSTEM_VERSION == 2 |
---|
[7169] | 275 | namespace filesystem2 |
---|
| 276 | { |
---|
| 277 | struct path_traits; |
---|
| 278 | template <class String, class Traits> class basic_path; |
---|
| 279 | typedef basic_path<std::string, path_traits> path; |
---|
| 280 | } |
---|
| 281 | namespace filesystem |
---|
| 282 | { |
---|
| 283 | using filesystem2::basic_path; |
---|
| 284 | using filesystem2::path_traits; |
---|
| 285 | using filesystem2::path; |
---|
| 286 | } |
---|
[8225] | 287 | # elif BOOST_FILESYSTEM_VERSION == 3 |
---|
[8066] | 288 | namespace filesystem3 |
---|
| 289 | { |
---|
| 290 | class path; |
---|
| 291 | } |
---|
| 292 | namespace filesystem |
---|
| 293 | { |
---|
| 294 | using filesystem3::path; |
---|
| 295 | } |
---|
[8225] | 296 | # endif |
---|
| 297 | |
---|
| 298 | #elif |
---|
| 299 | |
---|
| 300 | // TODO: Check this once boost 1.48 is released |
---|
| 301 | namespace filesystem |
---|
| 302 | { |
---|
| 303 | class path; |
---|
| 304 | } |
---|
| 305 | |
---|
[7169] | 306 | #endif |
---|
[8225] | 307 | |
---|
[3304] | 308 | class thread; |
---|
| 309 | class mutex; |
---|
[3318] | 310 | class shared_mutex; |
---|
| 311 | class condition_variable; |
---|
[3304] | 312 | } |
---|
[3196] | 313 | |
---|
[5695] | 314 | // Ogre |
---|
| 315 | namespace Ogre |
---|
| 316 | { |
---|
| 317 | class DataStream; |
---|
| 318 | template <class T> class SharedPtr; |
---|
| 319 | typedef SharedPtr<DataStream> DataStreamPtr; |
---|
| 320 | } |
---|
| 321 | namespace orxonox |
---|
| 322 | { |
---|
| 323 | // Import the Ogre::DataStream |
---|
| 324 | using Ogre::DataStream; |
---|
| 325 | using Ogre::DataStreamPtr; |
---|
| 326 | } |
---|
| 327 | |
---|
[3370] | 328 | // CEGUI |
---|
| 329 | namespace CEGUI |
---|
| 330 | { |
---|
| 331 | class DefaultLogger; |
---|
| 332 | class Logger; |
---|
| 333 | class LuaScriptModule; |
---|
| 334 | |
---|
[7960] | 335 | #if CEGUI_VERSION_MAJOR < 1 && CEGUI_VERSION_MINOR < 7 |
---|
[3370] | 336 | class OgreCEGUIRenderer; |
---|
| 337 | class OgreCEGUIResourceProvider; |
---|
| 338 | class OgreCEGUITexture; |
---|
[7960] | 339 | #else |
---|
| 340 | class OgreRenderer; |
---|
| 341 | class OgreResourceProvider; |
---|
| 342 | class OgreImageCodec; |
---|
| 343 | #endif |
---|
[3370] | 344 | } |
---|
| 345 | |
---|
| 346 | // Lua |
---|
| 347 | struct lua_State; |
---|
| 348 | |
---|
[3196] | 349 | // TinyXML and TinyXML++ |
---|
| 350 | class TiXmlString; |
---|
| 351 | class TiXmlOutStream; |
---|
| 352 | class TiXmlNode; |
---|
| 353 | class TiXmlHandle; |
---|
| 354 | class TiXmlDocument; |
---|
| 355 | class TiXmlElement; |
---|
| 356 | class TiXmlComment; |
---|
| 357 | class TiXmlUnknown; |
---|
| 358 | class TiXmlAttribute; |
---|
| 359 | class TiXmlText; |
---|
| 360 | class TiXmlDeclaration; |
---|
| 361 | class TiXmlParsingData; |
---|
| 362 | namespace ticpp |
---|
| 363 | { |
---|
| 364 | class Document; |
---|
| 365 | class Element; |
---|
| 366 | class Declaration; |
---|
| 367 | class StylesheetReference; |
---|
| 368 | class Text; |
---|
| 369 | class Comment; |
---|
| 370 | class Attribute; |
---|
| 371 | } |
---|
| 372 | namespace orxonox |
---|
| 373 | { |
---|
| 374 | using ticpp::Element; |
---|
| 375 | } |
---|
| 376 | |
---|
[682] | 377 | #endif /* _CorePrereqs_H__ */ |
---|