Newer
Older
TB_Chris / TbKernel / src / lib / .svn / text-base / TbCondFile.cpp.svn-base
@iaro iaro on 9 May 2016 511 bytes first attempt of automated anal
  1. #include "TbKernel/TbCondFile.h"
  2.  
  3. template <>
  4. double TbCondFile::custom_cast(const std::string& ref) {
  5. return std::stod(ref);
  6. }
  7. template <>
  8. int TbCondFile::custom_cast(const std::string& ref) {
  9. return std::stoi(ref);
  10. }
  11. template <>
  12. std::string TbCondFile::custom_cast(const std::string& ref) {
  13. return ref;
  14. }
  15. template <>
  16. unsigned int TbCondFile::custom_cast(const std::string& ref) {
  17. return std::stoi(ref);
  18. }
  19.  
  20. template <>
  21. float TbCondFile::custom_cast(const std::string& ref) {
  22. return std::stof(ref);
  23. }