Changeset 845
- Timestamp:
- Mar 1, 2008, 9:29:23 PM (17 years ago)
- Location:
- code/branches/core/src
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core/src/network/Synchronisable.h
r828 r845 2 2 // C++ Interface: synchronisable 3 3 // 4 // Description: 4 // Description: 5 5 // 6 6 // … … 66 66 int datasize; 67 67 }; 68 69 }70 71 namespace orxonox72 {73 template class _NetworkExport ClassIdentifier<network::Synchronisable>;74 template class _NetworkExport ObjectList<network::Synchronisable>;75 68 } 76 69 -
code/branches/core/src/orxonox/core/BaseObject.h
r826 r845 58 58 const Level* level_; //!< The level that loaded this object 59 59 }; 60 ExportClass(BaseObject, Core);61 60 } 62 61 -
code/branches/core/src/orxonox/core/CoreIncludes.h
r820 r845 91 91 92 92 /** 93 @brief Exports the necessary templates in order to make them available to all libraries.94 @param ClassName The name of the Class95 @param LibraryName The name of the Library96 */97 #define ExportClass(ClassName, LibraryName) \98 template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \99 template class _##LibraryName##Export orxonox::ObjectList<ClassName>; \100 template class _##LibraryName##Export orxonox::ClassFactory<ClassName>101 102 /**103 @brief Exports the necessary templates in order to make them available to all libraries.104 @param ClassName The name of the Class105 @param LibraryName The name of the Library106 */107 #define ExportAbstractClass(ClassName, LibraryName) \108 template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \109 template class _##LibraryName##Export orxonox::ObjectList<ClassName>110 111 /**112 93 @brief Returns the Identifier of the given class. 113 94 @param ClassName The name of the class -
code/branches/core/src/orxonox/core/DebugLevel.h
r813 r845 66 66 ConfigValueContainer* softDebugLevelContainer_; //!< The config value container for the debug level 67 67 }; 68 ExportAbstractClass(DebugLevel, Core);69 68 } 70 69 -
code/branches/core/src/orxonox/core/Language.h
r839 r845 83 83 bool bLocalisationSet_; //!< True if the translation was set 84 84 }; 85 template class _CoreExport orxonox::ClassIdentifier<LanguageEntry>;86 template class _CoreExport orxonox::ObjectList<LanguageEntry>;87 85 88 86 … … 118 116 std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their labels 119 117 }; 120 template class _CoreExport orxonox::ClassIdentifier<Language>;121 template class _CoreExport orxonox::ObjectList<Language>;122 118 } 123 119 -
code/branches/core/src/orxonox/core/OrxonoxClass.h
r817 r845 183 183 bool bVisible_; //!< True = the object is visible 184 184 }; 185 template class _CoreExport orxonox::ClassIdentifier<OrxonoxClass>;186 template class _CoreExport orxonox::ObjectList<OrxonoxClass>;187 185 } 188 186 -
code/branches/core/src/orxonox/objects/Ambient.cc
r790 r845 45 45 namespace orxonox 46 46 { 47 // create a template instantiations48 //template class _OrxonoxExport ClassIdentifier<Ambient>;49 50 47 CreateFactory(Ambient); 51 48 -
code/branches/core/src/orxonox/objects/Ambient.h
r790 r845 14 14 virtual ~Ambient(); 15 15 16 16 17 17 void loadParams(TiXmlElement* xmlElem); 18 18 19 19 private: 20 20 21 21 22 22 }; 23 ExportClass(Ambient, Orxonox);24 23 } 25 24 -
code/branches/core/src/orxonox/objects/Camera.h
r790 r845 14 14 virtual ~Camera(); 15 15 16 16 17 17 void loadParams(TiXmlElement* xmlElem); 18 18 19 19 private: 20 20 21 21 22 22 }; 23 ExportClass(Camera, Orxonox);24 23 } 25 24 -
code/branches/core/src/orxonox/objects/Explosion.h
r790 r845 21 21 ParticleInterface* particle_; 22 22 }; 23 ExportClass(Explosion, Orxonox);24 23 } 25 24 -
code/branches/core/src/orxonox/objects/Fighter.h
r790 r845 90 90 int emitterRate_; 91 91 }; 92 ExportClass(Fighter, Orxonox);93 92 } 94 93 -
code/branches/core/src/orxonox/objects/Model.h
r790 r845 25 25 void registerAllVariables(); 26 26 }; 27 ExportClass(Model, Orxonox);28 27 } 29 28 -
code/branches/core/src/orxonox/objects/NPC.h
r790 r845 44 44 static int const NUMELEMENTS = 9; //number of elements 45 45 }; 46 ExportClass(NPC, Orxonox);47 48 46 } 49 47 #endif /* _NPC_H__ */ -
code/branches/core/src/orxonox/objects/Projectile.h
r790 r845 28 28 Timer<Projectile> destroyTimer_; 29 29 }; 30 ExportClass(Projectile, Orxonox);31 30 } 32 31 -
code/branches/core/src/orxonox/objects/Skybox.h
r790 r845 16 16 virtual ~Skybox(); 17 17 18 18 19 19 void loadParams(TiXmlElement* xmlElem); 20 20 21 21 private: 22 22 23 23 24 24 }; 25 ExportClass(Skybox, Orxonox);26 25 } 27 26 -
code/branches/core/src/orxonox/objects/SpaceShip.h
r790 r845 75 75 int emitterRate_; 76 76 }; 77 ExportClass(SpaceShip, Orxonox);78 77 } 79 78 -
code/branches/core/src/orxonox/objects/Tickable.h
r790 r845 67 67 Tickable() { RegisterRootObject(Tickable); } 68 68 }; 69 ExportAbstractClass(Tickable, Orxonox);70 69 71 70 //! The TickFrameListener calls the tick(dt) function of all Tickables every frame. -
code/branches/core/src/orxonox/objects/WorldEntity.h
r793 r845 147 147 bool bStatic_; 148 148 }; 149 ExportClass(WorldEntity, Orxonox);150 149 } 151 150 -
code/branches/core/src/orxonox/objects/weapon/AmmunitionDump.h
r790 r845 66 66 int *capacity_; 67 67 }; 68 ExportClass(AmmunitionDump, Orxonox);69 68 } 70 69 -
code/branches/core/src/orxonox/objects/weapon/BarrelGun.h
r790 r845 60 60 61 61 }; 62 ExportClass(BarrelGun, Orxonox);63 62 } 64 63 -
code/branches/core/src/orxonox/objects/weapon/BaseWeapon.h
r790 r845 122 122 123 123 }; 124 ExportAbstractClass(BaseWeapon, Orxonox);125 124 } 126 125 -
code/branches/core/src/orxonox/objects/weapon/Bullet.h
r790 r845 47 47 inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); }; 48 48 }; 49 ExportClass(Bullet, Orxonox);50 49 } 51 50 -
code/branches/core/src/orxonox/objects/weapon/BulletManager.h
r790 r845 67 67 int bulletsIndex_; 68 68 }; 69 ExportClass(BulletManager, Orxonox);70 69 } 71 70 -
code/branches/core/src/orxonox/tools/Timer.h
r813 r845 104 104 float time_; //!< Internal variable, counting the time till the next function-call 105 105 }; 106 ExportAbstractClass(TimerBase, Orxonox);107 106 108 107 //! The Timer is a callback-object, calling a given function after a given time-interval. … … 158 157 T* object_; 159 158 }; 160 ExportAbstractClass(Timer<BaseObject>, Orxonox);161 159 162 160 //! The TimerFrameListener manages all Timers in the game. -
code/branches/core/src/util/Convert.h
r827 r845 41 41 // DEFAULT CLASS 42 42 template <typename FromType, typename ToType> 43 class _UtilExportConverter43 class Converter 44 44 { 45 45 public: … … 52 52 // PARTIAL SPECIALIZATION TO CONVERT TO STRINGS 53 53 template<typename FromType> 54 class _UtilExportConverter<FromType, std::string>54 class Converter<FromType, std::string> 55 55 { 56 56 public: … … 70 70 // PARTIAL SPECIALIZATION TO CONVERT FROM STRING 71 71 template<typename ToType> 72 class _UtilExportConverter<std::string, ToType>72 class Converter<std::string, ToType> 73 73 { 74 74 public: … … 85 85 // FUNCTION SO WE DO NOT HAVE TO TELL THE COMPILER ABOUT THE TYPE 86 86 template<typename FromType, typename ToType> 87 static _UtilExportbool ConvertValue(ToType* output, const FromType& input)87 static bool ConvertValue(ToType* output, const FromType& input) 88 88 { 89 89 Converter<FromType, ToType> converter; … … 93 93 // THE SAME, BUT WITH DEFAULT VALUE 94 94 template<typename FromType, typename ToType> 95 static _UtilExportbool ConvertValue(ToType* output, const FromType& input, const ToType& fallback)95 static bool ConvertValue(ToType* output, const FromType& input, const ToType& fallback) 96 96 { 97 97 Converter<FromType, ToType> converter; … … 108 108 // Vector2 to std::string 109 109 template <> 110 class _UtilExportConverter<orxonox::Vector2, std::string>110 class Converter<orxonox::Vector2, std::string> 111 111 { 112 112 public: … … 126 126 // Vector3 to std::string 127 127 template <> 128 class _UtilExportConverter<orxonox::Vector3, std::string>128 class Converter<orxonox::Vector3, std::string> 129 129 { 130 130 public: … … 144 144 // Vector4 to std::string 145 145 template <> 146 class _UtilExportConverter<orxonox::Vector4, std::string>146 class Converter<orxonox::Vector4, std::string> 147 147 { 148 148 public: … … 162 162 // Quaternion to std::string 163 163 template <> 164 class _UtilExportConverter<orxonox::Quaternion, std::string>164 class Converter<orxonox::Quaternion, std::string> 165 165 { 166 166 public: … … 180 180 // ColourValue to std::string 181 181 template <> 182 class _UtilExportConverter<orxonox::ColourValue, std::string>182 class Converter<orxonox::ColourValue, std::string> 183 183 { 184 184 public: -
code/branches/core/src/util/Math.h
r792 r845 59 59 60 60 template <typename T> 61 inline _UtilExportT sgn(T x)61 inline T sgn(T x) 62 62 { 63 63 return (x >= 0) ? 1 : -1; … … 65 65 66 66 template <typename T> 67 inline _UtilExportT min(T a, T b)67 inline T min(T a, T b) 68 68 { 69 69 return (a <= b) ? a : b; … … 71 71 72 72 template <typename T> 73 inline _UtilExportT max(T a, T b)73 inline T max(T a, T b) 74 74 { 75 75 return (a >= b) ? a : b; … … 77 77 78 78 template <typename T> 79 inline _UtilExportT clamp(T x, T min, T max)79 inline T clamp(T x, T min, T max) 80 80 { 81 81 if (x < min) … … 89 89 90 90 template <typename T> 91 inline _UtilExportT square(T x)91 inline T square(T x) 92 92 { 93 93 return x*x; … … 95 95 96 96 template <typename T> 97 inline _UtilExportT cube(T x)97 inline T cube(T x) 98 98 { 99 99 return x*x*x; … … 101 101 102 102 template <typename T> 103 inline _UtilExportint floor(T x)103 inline int floor(T x) 104 104 { 105 105 return (int)(x); … … 107 107 108 108 template <typename T> 109 inline _UtilExportint ceil(T x)109 inline int ceil(T x) 110 110 { 111 111 int temp = floor(x); … … 114 114 115 115 template <typename T> 116 inline _UtilExportint round(T x)116 inline int round(T x) 117 117 { 118 118 return (int)(x + 0.5); … … 120 120 121 121 template <typename T> 122 _UtilExportT interpolate(float time, const T& start, const T& end)122 T interpolate(float time, const T& start, const T& end) 123 123 { 124 124 return time * (end - start) + start; … … 126 126 127 127 template <typename T> 128 _UtilExportT interpolateSmooth(float time, const T& start, const T& end)128 T interpolateSmooth(float time, const T& start, const T& end) 129 129 { 130 130 return (-2 * (end - start) * cube(time)) + (3 * (end - start) * square(time)) + start; -
code/branches/core/src/util/String2Number.h
r792 r845 24 24 25 25 template <class T> 26 class _UtilExportString2Number26 class String2Number 27 27 { 28 28 private:
Note: See TracChangeset
for help on using the changeset viewer.