Changeset 845 for code/branches/core/src/util/Convert.h
- Timestamp:
- Mar 1, 2008, 9:29:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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:
Note: See TracChangeset
for help on using the changeset viewer.