[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 |
---|
| 55 | #elif defined ( ORXONOX_GCC_VISIBILITY ) |
---|
| 56 | # define _CoreExport __attribute__ ((visibility("default"))) |
---|
| 57 | #else |
---|
| 58 | # define _CoreExport |
---|
| 59 | #endif |
---|
[682] | 60 | |
---|
[5929] | 61 | //----------------------------------------------------------------------- |
---|
| 62 | // Constants |
---|
| 63 | //----------------------------------------------------------------------- |
---|
[728] | 64 | |
---|
[5929] | 65 | namespace orxonox |
---|
| 66 | { |
---|
| 67 | static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1); |
---|
| 68 | } |
---|
| 69 | |
---|
[682] | 70 | //----------------------------------------------------------------------- |
---|
[5929] | 71 | // Enums |
---|
[728] | 72 | //----------------------------------------------------------------------- |
---|
[5929] | 73 | |
---|
[728] | 74 | namespace orxonox |
---|
[684] | 75 | { |
---|
[3196] | 76 | namespace XMLPort |
---|
[1052] | 77 | { |
---|
[3196] | 78 | enum Mode |
---|
| 79 | { |
---|
[5929] | 80 | NOP, |
---|
[3196] | 81 | LoadObject, |
---|
| 82 | SaveObject, |
---|
| 83 | ExpandObject |
---|
| 84 | }; |
---|
| 85 | } |
---|
[1052] | 86 | |
---|
[6536] | 87 | namespace ConfigFileType |
---|
| 88 | { |
---|
| 89 | enum Value |
---|
| 90 | { |
---|
| 91 | Settings, |
---|
| 92 | JoyStickCalibration, |
---|
| 93 | CommandHistory |
---|
| 94 | // Don't forget to adjust the array size in the ConfigFileManager when adding a new entry here! |
---|
| 95 | }; |
---|
| 96 | } |
---|
| 97 | |
---|
[3196] | 98 | namespace KeybindMode |
---|
[1502] | 99 | { |
---|
[3280] | 100 | enum Value |
---|
[3196] | 101 | { |
---|
| 102 | OnPress, |
---|
| 103 | OnHold, |
---|
| 104 | OnRelease, |
---|
| 105 | None |
---|
| 106 | }; |
---|
[1502] | 107 | }; |
---|
[5929] | 108 | } |
---|
[1349] | 109 | |
---|
[5929] | 110 | //----------------------------------------------------------------------- |
---|
| 111 | // Forward declarations |
---|
| 112 | //----------------------------------------------------------------------- |
---|
| 113 | |
---|
| 114 | namespace orxonox |
---|
| 115 | { |
---|
[3196] | 116 | typedef std::string LanguageEntryLabel; |
---|
[1024] | 117 | |
---|
[7271] | 118 | template <class T, class U> |
---|
| 119 | T orxonox_cast(U*); |
---|
| 120 | |
---|
[3196] | 121 | class BaseObject; |
---|
| 122 | template <class T> |
---|
| 123 | class ClassFactory; |
---|
| 124 | template <class T> |
---|
| 125 | class ClassIdentifier; |
---|
| 126 | class ClassTreeMask; |
---|
| 127 | class ClassTreeMaskIterator; |
---|
| 128 | class ClassTreeMaskNode; |
---|
| 129 | class ClassTreeMaskObjectIterator; |
---|
[6021] | 130 | class CommandLineParser; |
---|
[3196] | 131 | class CommandLineArgument; |
---|
| 132 | class ConfigFile; |
---|
| 133 | class ConfigFileEntry; |
---|
| 134 | class ConfigFileEntryComment; |
---|
| 135 | class ConfigFileEntryValue; |
---|
| 136 | class ConfigFileManager; |
---|
| 137 | class ConfigFileSection; |
---|
| 138 | class ConfigValueContainer; |
---|
| 139 | class Core; |
---|
[5693] | 140 | class DynLib; |
---|
| 141 | class DynLibManager; |
---|
[3196] | 142 | struct Event; |
---|
[5929] | 143 | class EventState; |
---|
[3196] | 144 | class Factory; |
---|
[5929] | 145 | class Game; |
---|
| 146 | class GameState; |
---|
| 147 | struct GameStateInfo; |
---|
| 148 | struct GameStateTreeNode; |
---|
[3370] | 149 | class GraphicsManager; |
---|
| 150 | class GUIManager; |
---|
[3196] | 151 | class Identifier; |
---|
| 152 | template <class T> |
---|
| 153 | class Iterator; |
---|
| 154 | class Language; |
---|
[7284] | 155 | class LuaFunctor; |
---|
[5695] | 156 | class LuaState; |
---|
| 157 | class MemoryArchive; |
---|
| 158 | class MemoryArchiveFactory; |
---|
[3196] | 159 | class MetaObjectList; |
---|
| 160 | class MetaObjectListElement; |
---|
| 161 | class Namespace; |
---|
| 162 | class NamespaceNode; |
---|
| 163 | template <class T> |
---|
| 164 | class ObjectList; |
---|
| 165 | class ObjectListBase; |
---|
| 166 | class ObjectListBaseElement; |
---|
| 167 | template <class T> |
---|
| 168 | class ObjectListElement; |
---|
| 169 | template <class T> |
---|
| 170 | class ObjectListIterator; |
---|
[3370] | 171 | class OgreWindowEventListener; |
---|
[3196] | 172 | class OrxonoxClass; |
---|
[5929] | 173 | class PathConfig; |
---|
[5695] | 174 | struct ResourceInfo; |
---|
[6536] | 175 | class SettingsConfigFile; |
---|
[3196] | 176 | template <class T> |
---|
[5929] | 177 | class SmartPtr; |
---|
| 178 | template <class T> |
---|
[3196] | 179 | class SubclassIdentifier; |
---|
| 180 | class Template; |
---|
[5929] | 181 | class Thread; |
---|
| 182 | class ThreadPool; |
---|
| 183 | template <class T> |
---|
| 184 | class WeakPtr; |
---|
[3327] | 185 | class WindowEventListener; |
---|
[3196] | 186 | class XMLFile; |
---|
| 187 | class XMLNameListener; |
---|
| 188 | template <class T, class O> |
---|
| 189 | class XMLPortClassObjectContainer; |
---|
| 190 | template <class T> |
---|
| 191 | class XMLPortClassParamContainer; |
---|
| 192 | class XMLPortObjectContainer; |
---|
| 193 | class XMLPortParamContainer; |
---|
[1219] | 194 | |
---|
[7284] | 195 | // Command |
---|
| 196 | class ArgumentCompleter; |
---|
| 197 | class ArgumentCompletionListElement; |
---|
| 198 | class CommandEvaluation; |
---|
| 199 | class ConsoleCommand; |
---|
| 200 | class Executor; |
---|
| 201 | template <class T> |
---|
| 202 | class ExecutorMember; |
---|
| 203 | class ExecutorStatic; |
---|
| 204 | class Functor; |
---|
| 205 | template <class O> |
---|
| 206 | class FunctorMember; |
---|
| 207 | typedef FunctorMember<void> FunctorStatic; |
---|
| 208 | template <class F, class O> |
---|
| 209 | class FunctorPointer; |
---|
| 210 | class IOConsole; |
---|
| 211 | class IRC; |
---|
| 212 | class Shell; |
---|
| 213 | class ShellListener; |
---|
| 214 | class TclBind; |
---|
| 215 | struct TclInterpreterBundle; |
---|
| 216 | template <class T> |
---|
| 217 | class TclThreadList; |
---|
| 218 | class TclThreadManager; |
---|
| 219 | |
---|
[5929] | 220 | // Input |
---|
[3196] | 221 | class BaseCommand; |
---|
| 222 | class BufferedParamCommand; |
---|
| 223 | class Button; |
---|
| 224 | class HalfAxis; |
---|
| 225 | class InputBuffer; |
---|
[3327] | 226 | class InputDevice; |
---|
| 227 | template <class Traits> |
---|
| 228 | class InputDeviceTemplated; |
---|
| 229 | class InputHandler; |
---|
[3196] | 230 | class InputManager; |
---|
| 231 | class InputState; |
---|
[5929] | 232 | struct InputStatePriority; |
---|
| 233 | class JoyStickQuantityListener; |
---|
[3327] | 234 | class JoyStick; |
---|
[5929] | 235 | class KeyBinder; |
---|
| 236 | class KeyBinderManager; |
---|
[3327] | 237 | class Keyboard; |
---|
[3196] | 238 | class KeyDetector; |
---|
[5929] | 239 | class KeyEvent; |
---|
| 240 | class Mouse; |
---|
[3196] | 241 | class ParamCommand; |
---|
| 242 | class SimpleCommand; |
---|
[682] | 243 | } |
---|
| 244 | |
---|
[7284] | 245 | #include "command/FunctorPtr.h" |
---|
| 246 | #include "command/ExecutorPtr.h" |
---|
| 247 | |
---|
[3196] | 248 | // CppTcl |
---|
| 249 | namespace Tcl |
---|
| 250 | { |
---|
| 251 | class interpreter; |
---|
| 252 | class object; |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | // Boost |
---|
[3304] | 256 | namespace boost |
---|
[3318] | 257 | { |
---|
[7169] | 258 | #if (BOOST_VERSION < 104400) |
---|
[3304] | 259 | namespace filesystem |
---|
| 260 | { |
---|
| 261 | struct path_traits; |
---|
| 262 | template <class String, class Traits> class basic_path; |
---|
| 263 | typedef basic_path<std::string, path_traits> path; |
---|
| 264 | } |
---|
[7169] | 265 | #else |
---|
| 266 | namespace filesystem2 |
---|
| 267 | { |
---|
| 268 | struct path_traits; |
---|
| 269 | template <class String, class Traits> class basic_path; |
---|
| 270 | typedef basic_path<std::string, path_traits> path; |
---|
| 271 | } |
---|
| 272 | namespace filesystem |
---|
| 273 | { |
---|
| 274 | using filesystem2::basic_path; |
---|
| 275 | using filesystem2::path_traits; |
---|
| 276 | using filesystem2::path; |
---|
| 277 | } |
---|
| 278 | #endif |
---|
[3304] | 279 | class thread; |
---|
| 280 | class mutex; |
---|
[3318] | 281 | class shared_mutex; |
---|
| 282 | class condition_variable; |
---|
[3304] | 283 | } |
---|
[3196] | 284 | |
---|
[5695] | 285 | // Ogre |
---|
| 286 | namespace Ogre |
---|
| 287 | { |
---|
| 288 | class DataStream; |
---|
| 289 | template <class T> class SharedPtr; |
---|
| 290 | typedef SharedPtr<DataStream> DataStreamPtr; |
---|
| 291 | } |
---|
| 292 | namespace orxonox |
---|
| 293 | { |
---|
| 294 | // Import the Ogre::DataStream |
---|
| 295 | using Ogre::DataStream; |
---|
| 296 | using Ogre::DataStreamPtr; |
---|
| 297 | } |
---|
| 298 | |
---|
[3370] | 299 | // CEGUI |
---|
| 300 | namespace CEGUI |
---|
| 301 | { |
---|
| 302 | class DefaultLogger; |
---|
| 303 | class Logger; |
---|
| 304 | class LuaScriptModule; |
---|
| 305 | |
---|
| 306 | class OgreCEGUIRenderer; |
---|
| 307 | class OgreCEGUIResourceProvider; |
---|
| 308 | class OgreCEGUITexture; |
---|
| 309 | } |
---|
| 310 | |
---|
| 311 | // Lua |
---|
| 312 | struct lua_State; |
---|
| 313 | |
---|
[3196] | 314 | // TinyXML and TinyXML++ |
---|
| 315 | class TiXmlString; |
---|
| 316 | class TiXmlOutStream; |
---|
| 317 | class TiXmlNode; |
---|
| 318 | class TiXmlHandle; |
---|
| 319 | class TiXmlDocument; |
---|
| 320 | class TiXmlElement; |
---|
| 321 | class TiXmlComment; |
---|
| 322 | class TiXmlUnknown; |
---|
| 323 | class TiXmlAttribute; |
---|
| 324 | class TiXmlText; |
---|
| 325 | class TiXmlDeclaration; |
---|
| 326 | class TiXmlParsingData; |
---|
| 327 | namespace ticpp |
---|
| 328 | { |
---|
| 329 | class Document; |
---|
| 330 | class Element; |
---|
| 331 | class Declaration; |
---|
| 332 | class StylesheetReference; |
---|
| 333 | class Text; |
---|
| 334 | class Comment; |
---|
| 335 | class Attribute; |
---|
| 336 | } |
---|
| 337 | namespace orxonox |
---|
| 338 | { |
---|
| 339 | using ticpp::Element; |
---|
| 340 | } |
---|
| 341 | |
---|
[682] | 342 | #endif /* _CorePrereqs_H__ */ |
---|