
Definition in file StringConversions.H.
#include <string>
#include <typeinfo>
#include "rutz/time.h"
Include dependency graph for StringConversions.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| class | conversion_error |
| Type of exception that is thrown from throwBadConversion. More... | |
Basic type string conversion functions | |
| std::string | convertToString (const int &val) |
| int -> string via stringstream | |
| void | convertFromString (const std::string &str, int &val) |
| string -> int via stringstream | |
| std::string | convertToString (const long int &val) |
| long int -> string via stringstream | |
| void | convertFromString (const std::string &str, long int &val) |
| string -> long int via stringstream | |
| std::string | convertToString (const long long int &val) |
| long long int -> string via stringstream | |
| void | convertFromString (const std::string &str, long long int &val) |
| string -> long long int via stringstream | |
| std::string | convertToString (const short int &val) |
| short int -> string via stringstream | |
| void | convertFromString (const std::string &str, short int &val) |
| string -> short int via stringstream | |
| std::string | convertToString (const unsigned int &val) |
| unsigned int -> string via stringstream | |
| void | convertFromString (const std::string &str, unsigned int &val) |
| string -> unsigned int via stringstream | |
| std::string | convertToString (const unsigned long int &val) |
| unsigned long int -> string via stringstream | |
| void | convertFromString (const std::string &str, unsigned long int &val) |
| string -> unsigned long int via stringstream | |
| std::string | convertToString (const unsigned long long int &val) |
| unsigned long long int -> string via stringstream | |
| void | convertFromString (const std::string &str, unsigned long long int &val) |
| string -> unsigned long long int via stringstream | |
| std::string | convertToString (const unsigned short int &val) |
| unsigned short int -> string via stringstream | |
| void | convertFromString (const std::string &str, unsigned short int &val) |
| string -> unsigned short int via stringstream | |
| std::string | convertToString (const unsigned char &val) |
| unsigned char -> string via stringstream | |
| void | convertFromString (const std::string &str, unsigned char &val) |
| string -> unsigned char via stringstream | |
| std::string | convertToString (const float &val) |
| float -> string via stringstream | |
| void | convertFromString (const std::string &str, float &val) |
| string -> float via stringstream | |
| std::string | convertToString (const double &val) |
| double -> string via stringstream | |
| void | convertFromString (const std::string &str, double &val) |
| string -> double stringstream | |
| std::string | convertToString (const std::string &val) |
| std::string overload | |
| void | convertFromString (const std::string &str, std::string &val) |
| std::string overload | |
| std::string | convertToString (const bool &val) |
| bool overload: format is "true|false" | |
| void | convertFromString (const std::string &str, bool &val) |
| bool overload | |
Overloaded implementations of string conversion functions | |
| std::string | convertToString (const in_addr &val) |
| in_addr overload: format is "<int>.<int>.<int>.<int>" | |
| void | convertFromString (const std::string &str, in_addr &val) |
| in_addr overload: format is "<int>.<int>.<int>.<int>" | |
| std::string | convertToString (const rutz::time &val) |
| rutz::time overload: format is "<h>:<m>:<s>.<ms>" | |
| void | convertFromString (const std::string &str, rutz::time &val) |
| rutz::time overload: format is "<h>:<m>:<s>.<ms>" | |
Easier-syntax functions to convert to/from string | |
| template<class T> | |
| std::string | toStr (const T &val) |
| converts val into a string and returns the string | |
| template<class T> | |
| T | fromStr (const std::string &str) |
| converts str into a T value and returns the T value | |
|
||||||||||||
|
rutz::time overload: format is "<h>:<m>:<s>.<ms>"
Definition at line 298 of file StringConversions.C. References c, h, rutz::time::reset(), and s. |
|
||||||||||||
|
in_addr overload: format is "<int>.<int>.<int>.<int>"
Definition at line 274 of file StringConversions.C. |
|
||||||||||||
|
bool overload Anything with a first letter 't', T', 'y', 'Y', or '1' will convert to true; anything with a first letter 'f', F', 'n', 'N', or '0' will convert to false Definition at line 250 of file StringConversions.C. References c. |
|
||||||||||||
|
std::string overload
Definition at line 239 of file StringConversions.C. |
|
||||||||||||
|
string -> double stringstream
Definition at line 228 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> float via stringstream
Definition at line 220 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> unsigned char via stringstream
Definition at line 200 of file StringConversions.C. References rutz::max(), and string_to_basictype(). |
|
||||||||||||
|
string -> unsigned short int via stringstream
Definition at line 189 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> unsigned long long int via stringstream
Definition at line 181 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> unsigned long int via stringstream
Definition at line 173 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> unsigned int via stringstream
Definition at line 165 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> short int via stringstream
Definition at line 157 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> long long int via stringstream
Definition at line 149 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> long int via stringstream
Definition at line 141 of file StringConversions.C. References string_to_basictype(). |
|
||||||||||||
|
string -> int via stringstream
Definition at line 133 of file StringConversions.C. References string_to_basictype(). |
|
|
rutz::time overload: format is "<h>:<m>:<s>.<ms>"
Definition at line 287 of file StringConversions.C. References s, rutz::time::sec(), and sformat(). |
|
|
in_addr overload: format is "<int>.<int>.<int>.<int>"
Definition at line 266 of file StringConversions.C. References s. |
|
|
bool overload: format is "true|false"
Definition at line 247 of file StringConversions.C. |
|
|
std::string overload
Definition at line 236 of file StringConversions.C. |
|
|
double -> string via stringstream
Definition at line 225 of file StringConversions.C. References basictype_to_string(). |
|
|
float -> string via stringstream
Definition at line 217 of file StringConversions.C. References basictype_to_string(). |
|
|
unsigned char -> string via stringstream
Definition at line 194 of file StringConversions.C. References basictype_to_string(). |
|
|
unsigned short int -> string via stringstream
Definition at line 186 of file StringConversions.C. References basictype_to_string(). |
|
|
unsigned long long int -> string via stringstream
Definition at line 178 of file StringConversions.C. References basictype_to_string(). |
|
|
unsigned long int -> string via stringstream
Definition at line 170 of file StringConversions.C. References basictype_to_string(). |
|
|
unsigned int -> string via stringstream
Definition at line 162 of file StringConversions.C. References basictype_to_string(). |
|
|
short int -> string via stringstream
Definition at line 154 of file StringConversions.C. References basictype_to_string(). |
|
|
long long int -> string via stringstream
Definition at line 146 of file StringConversions.C. References basictype_to_string(). |
|
|
long int -> string via stringstream
Definition at line 138 of file StringConversions.C. References basictype_to_string(). |
|
|
int -> string via stringstream
Definition at line 130 of file StringConversions.C. References basictype_to_string(). |
|
||||||||||
|
converts str into a T value and returns the T value
Definition at line 206 of file StringConversions.H. References convertFromString. |
|
||||||||||
|
converts val into a string and returns the string
Definition at line 198 of file StringConversions.H. References convertToString(). Referenced by DirectFeedChannel::DirectFeedChannel(), DirectFeedChannel::doInput(), VisualEventSet::drawTokens(), ModelManagerWizard::handleCheckBox(), main(), stringconversions_xx_int_xx_1(), stringconversions_xx_unsigned_char_xx_1(), stringconversions_xx_unsigned_int_xx_1(), and PrefItemNum< T >::toString(). |
1.4.4