#include <Xstring.h>
Static Public Member Functions | |
| static T | convertFromString (const std::string &s) |
| static std::string | convertToString (const T &t) |
Definition at line 7 of file Xstring.h.
|
||||||||||
|
Definition at line 11 of file Xstring.h. 00012 { 00013 std::istringstream in(s); 00014 T x; 00015 if (in >> x) 00016 return x; 00017 // some sort of error handling goes here... 00018 return 0; 00019 /* Exemple: 00020 Tango::DevShort attr_gain_write = XString<Tango::DevShort>::convertFromString(mem_value); 00021 */ 00022 }
|
|
||||||||||
|
Definition at line 24 of file Xstring.h. Referenced by dtos(), itos(), and ltos(). 00025 { 00026 std::ostringstream out ; 00027 00028 if (out << std::fixed << t ) 00029 return out.str(); 00030 // some sort of error handling goes here... 00031 return 0; 00032 /* Exemple: 00033 string frequence = XString<Tango::DevDouble>::convertToString(attr_frequency_write); 00034 */ 00035 }
|
1.4.5