Changeset 2017 for code/branches
- Timestamp:
- Oct 26, 2008, 12:46:44 PM (16 years ago)
- Location:
- code/branches/objecthierarchy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/util/Convert.h
r2016 r2017 139 139 << " to type " << typeid(ToType).name() << std::endl; 140 140 return false; 141 } 142 }; 143 144 // If all else fails, try a dynamic_cast for pointer types. 145 template <class FromType, class ToType> 146 struct ConverterFallback<FromType*, ToType*> 147 { 148 static bool convert(ToType** output, FromType* const input) 149 { 150 ToType* temp = dynamic_cast<ToType*>(input); 151 if (temp) 152 { 153 *output = temp; 154 return true; 155 } 156 else 157 return false; 141 158 } 142 159 }; … … 345 362 // That means you can call it exactly like static_cast<ToType>(fromTypeValue). 346 363 template<class ToType, class FromType> 347 inline ToType conversion_cast(const FromType& input)364 inline ToType omni_cast(const FromType& input) 348 365 { 349 366 ToType output; … … 354 371 // convert to string Shortcut 355 372 template <class FromType> 356 std::string convertToString(FromType value)373 inline std::string convertToString(FromType value) 357 374 { 358 375 return getConvertedValue<FromType, std::string>(value); … … 361 378 // convert from string Shortcut 362 379 template <class ToType> 363 ToType convertFromString(std::string str)380 inline ToType convertFromString(std::string str) 364 381 { 365 382 return getConvertedValue<std::string, ToType>(str); -
code/branches/objecthierarchy/visual_studio/vc8/directories.vsprops
r1905 r2017 13 13 <UserMacro 14 14 Name="LibDir" 15 Value="$(RootDir) \dependencies\$(SolutionName)\"15 Value="$(RootDir)..\lib_dist\vc8\dependencies\$(SolutionName)\" 16 16 /> 17 17 </VisualStudioPropertySheet>
Note: See TracChangeset
for help on using the changeset viewer.