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.
|
ValueType | getType (void) const |
| Retrieves the value type for the instance.
|
Value & | operator= (Value const &orig) throw (Bad_Data_Type) |
| Assignment operator.
|
virtual | ~Value () |
| Destructor.
|
Static Public Member Functions |
static void | stringRepr (std::ostream &ostr, std::string const &str) |
| Represents a string in JSON Notation.
|
static Value * | duplicate (Value const &orig) |
| Creates a duplicate of a value.
|
Private Attributes |
std::string | data_ |
| Container to hold the value itself.
|
Detailed Description
Class for handling numeric values.
- This class is a container for JSON numeric values.
- Author
- Kombo Morongo moron.nosp@m.go66.nosp@m.6@gma.nosp@m.il.c.nosp@m.om
Constructor & Destructor Documentation
JAULA::Value_String::Value_String |
( |
std::string const & |
data = "" | ) |
|
Constructor.
- Parameters
-
data | Initial value to be hold by the conatiner |
JAULA::Value_String::~Value_String |
( |
| ) |
|
|
virtual |
Member Function Documentation
std::string const & JAULA::Value_String::getData |
( |
void |
| ) |
const |
void JAULA::Value_String::repr |
( |
std::ostream & |
ostr | ) |
const |
|
virtual |
Represents the instance in a stream.
- Parameters
-
ostr | Stream where the instance is to be represented. |
- Description
- writes the instance content in JSON notation in a stream.
Implements JAULA::Value.
References data_, and stringRepr().
void JAULA::Value_String::set |
( |
std::string const & |
data | ) |
|
Establishes the contents of the instance.
- Parameters
-
data | Value to assign to the instance |
References data_.
void JAULA::Value_String::stringRepr |
( |
std::ostream & |
ostr, |
|
|
std::string const & |
str |
|
) |
| |
|
static |
Represents a string in JSON Notation.
- Parameters
-
ostr | stream where the representation is to be performed. |
str | String to represent |
- Description
- Represents a string in JSON notation, surrounding it with quotes and changing all the non-printable symbols by its control codes or unicode values.
Referenced by repr().
Field Documentation
std::string JAULA::Value_String::data_ |
|
private |
The documentation for this class was generated from the following files: