jaula API Reference
version 1.4.0
|
Class for handling numeric values. More...
#include <jaula_value_string.h>
Public Member Functions | |
std::string const & | getData (void) const |
Retrieves the value contained by the instance. | |
virtual void | repr (std::ostream &ostr) const |
Represents the instance in a stream. | |
void | set (std::string const &data) |
Establishes the contents of the instance. | |
virtual void | set (Value const &origin) throw (Bad_Data_Type) |
Copies the contents of one instance into another. | |
Value_String (std::string const &data="") | |
Constructor. | |
virtual | ~Value_String () |
Destructor. | |
Static Public Member Functions | |
static void | stringRepr (std::ostream &ostr, std::string const &str) |
Represents a string in JSON Notation. | |
Private Attributes | |
std::string | data_ |
Container to hold the value itself. |
Class for handling numeric values.
JAULA::Value_String::Value_String | ( | std::string const & | data = "" | ) |
Constructor.
data | Initial value to be hold by the conatiner |
JAULA::Value_String::~Value_String | ( | ) | [virtual] |
Destructor.
std::string const & JAULA::Value_String::getData | ( | void | ) | const |
Retrieves the value contained by the instance.
References data_.
Referenced by JAULA::Value::duplicate(), JAULA::Parser::Value_Parser::parseValue(), and set().
void JAULA::Value_String::repr | ( | std::ostream & | ostr | ) | const [virtual] |
Represents the instance in a stream.
ostr | Stream where the instance is to be represented. |
Implements JAULA::Value.
References data_, and stringRepr().
void JAULA::Value_String::set | ( | std::string const & | data | ) |
void JAULA::Value_String::set | ( | Value const & | origin | ) | throw (Bad_Data_Type) [virtual] |
Copies the contents of one instance into another.
origin | Reference to the value to be copied. |
Bad_Data_Type | This exception is launched in case that origin and destination value types are different. |
Reimplemented from JAULA::Value.
References JAULA::Exception::addOrigin(), getData(), and JAULA::Value::set().
void JAULA::Value_String::stringRepr | ( | std::ostream & | ostr, |
std::string const & | str | ||
) | [static] |
Represents a string in JSON Notation.
ostr | stream where the representation is to be performed. |
str | String to represent |
Referenced by repr().
std::string JAULA::Value_String::data_ [private] |