EvolvingObjects
|
#include <String.h>
Public Member Functions | |
String (const std::string &str) | |
Default ctor. | |
String () | |
Ctor used only when parsing. | |
virtual std::ostream & | print (std::ostream &out) const |
Prints out the string. | |
template<class T > | |
void | deserialize (T &value) |
Deserializes the current String into a given primitive type value. | |
template<> | |
void | deserialize (std::string &value) |
Specialization for strings, which don't need to be converted through a stringstream. | |
Protected Member Functions | |
String (const String &_) | |
String & | operator= (const String &_) |
JSON String.
Wrapper for string, so as to be used as a JSON object.
eoserial::String::String | ( | const std::string & | str | ) | [inline] |
void eoserial::String::deserialize | ( | T & | value | ) | [inline] |
Deserializes the current String into a given primitive type value.
Casts a eoserial::String into a primitive value, or in a type which at least overload operator>>.
value | The value in which we're writing. |
value | A reference to the variable we're writing into. |
It's not necessary to specify the variable type, which can be infered by compiler when invoking.