00001 /*************************************************************************** 00002 * * 00003 * (c) Art Tevs, MPI Informatik Saarbruecken * 00004 * mailto: <tevs@mpi-sb.mpg.de> * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 ***************************************************************************/ 00012 00013 #ifndef __NR_PREREQUISITIES_H_ 00014 #define __NR_PREREQUISITIES_H_ 00015 00016 00017 //------------------------------------------------------------------------------ 00018 // First get all information about the used platform 00019 //------------------------------------------------------------------------------ 00020 #include "Platform.h" 00021 00022 //------------------------------------------------------------------------------ 00023 // Standard library includings and definitions 00024 //------------------------------------------------------------------------------ 00025 #include "StdHeaders.h" 00026 00027 //------------------------------------------------------------------------------ 00028 // Now follows all forward declarations and type definitions 00029 //------------------------------------------------------------------------------ 00030 namespace nrEngine{ 00031 00032 //------------------------------------------------------------------------------ 00033 // Version Information 00034 // MAJOR.MINOR.PATH - for example 0.3.1 00035 //------------------------------------------------------------------------------ 00036 #define NR_VERSION_MAJOR 0 00037 #define NR_VERSION_MINOR 0 00038 #define NR_VERSION_PATCH 8 00039 #define NR_VERSION_NAME "Alores" 00040 #define NR_DEFAULT_EVENT_CHANNEL "nrEngine_default_channel" 00041 00042 //------------------------------------------------------------------------------ 00043 // Version Information unsigned integer 00044 // We have 8 bit for each component of the version part. 00045 // The integer is build in the way to be ably to test it against each self. 00046 // Lesser number means we have got one of the version parts smaller than 00047 // another one. 00048 //------------------------------------------------------------------------------ 00049 const unsigned int nrEngineVersion = NR_VERSION_MAJOR * 256 * 256 + 00050 NR_VERSION_MINOR * 256 + 00051 NR_VERSION_PATCH; 00052 00053 //------------------------------------------------------------------------------ 00054 // Some macros that makes the life easier 00055 //------------------------------------------------------------------------------ 00056 #define NR_SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } } 00057 #define NR_SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } } 00058 00059 #define NR_ENGINE_PROFILING 00060 00061 //------------------------------------------------------------------------------ 00062 // Basic-type definitions used in the engine 00063 //------------------------------------------------------------------------------ 00064 typedef unsigned char BYTE; 00065 typedef unsigned char byte; 00066 typedef unsigned char uchar; 00067 00068 typedef char int8; 00069 typedef unsigned char uint8; 00070 00071 typedef signed short int16; 00072 typedef unsigned short uint16; 00073 00074 typedef signed int int32; 00075 typedef unsigned int uint32; 00076 00077 typedef float float32; 00078 typedef double float64; 00079 00080 #if NR_PLATFORM == NR_PLATFORM_WIN32 00081 typedef signed __int64 int64; 00082 typedef unsigned __int64 uint64; 00083 #else 00084 typedef signed long long int64; 00085 typedef unsigned long long uint64; 00086 #endif 00087 00088 //---------------------------------------------------------------------------------- 00089 // Forward declarations of used classes. 00090 //---------------------------------------------------------------------------------- 00091 /*class CPriority; 00092 template<class T, class value_parser> class CDator; 00093 template<class T, class value_parser> class CDatorList; 00094 class CStringDator; 00095 template<class T> class CValueParser; 00096 */ 00097 00098 class Clock; 00099 class Engine; 00100 class ExceptionManager; 00101 class Exception; 00102 class ITask; 00103 class ITimeObserver; 00104 class Profiler; 00105 class Profile; 00106 class TimeSource; 00107 00108 class EmptyPlugin; 00109 class PluginLoader; 00110 class Plugin; 00111 00112 class IResourcePtr; 00113 class IResource; 00114 class ResourceManager; 00115 class ResourceHolder; 00116 template<class ResType> class ResourcePtr; 00117 class IResourceLoader; 00118 00119 class Kernel; 00120 class Log; 00121 //class NameValuePairs; 00122 class Timer; 00123 00124 class IStream; 00125 00126 class IFileSystem; 00127 class FileSystem; 00128 00129 class ScriptEngine; 00130 class IScript; 00131 class Script; 00132 class ScriptLoader; 00133 00134 class EventManager; 00135 class EventChannel; 00136 class EventActor; 00137 class Event; 00138 class EventFactory; 00139 00140 class VarArg; 00141 class Property; 00142 class PropertyManager; 00143 00144 }; // end namespace 00145 00146 00147 //---------------------------------------------------------------------------------- 00148 // Some includes that are essential for engine's work 00149 //---------------------------------------------------------------------------------- 00150 #include "Result.h" 00151 #include "KeySym.h" 00152 #include "StdHelpers.h" 00153 #include "SmartPtr.h" 00154 #include "GetTime.h" 00155 #include "VariadicArgument.h" 00156 00157 #endif