#include <value.h>
Inheritance diagram for StringValue:

Public Member Functions | |
| StringValue () | |
| Default constructor. | |
| StringValue (const Ustr &value) | |
| Construct a string value with the given std::string. | |
| virtual | ~StringValue () |
| Destructor is declared virtual, as it always should be. | |
| ValueType | GetType () const |
| Return this instance's type. | |
| virtual std::string | AsString () const |
| Gets the value as a string. | |
| virtual Ustr | AsUstr () const |
| Gets the value as a string. | |
| virtual long | AsInt () const |
| Attempts to get the value as an int. | |
| virtual double | AsFloat () const |
| Attempts to get the value as a float. | |
| StringValue::StringValue | ( | ) | [inline] |
Default constructor.
| StringValue::StringValue | ( | const Ustr & | value | ) | [inline] |
Construct a string value with the given std::string.
| value | String value to assign. |
| virtual StringValue::~StringValue | ( | ) | [inline, virtual] |
Destructor is declared virtual, as it always should be.
| ValueType StringValue::GetType | ( | ) | const [inline, virtual] |
| virtual std::string StringValue::AsString | ( | ) | const [inline, virtual] |
| virtual Ustr StringValue::AsUstr | ( | ) | const [inline, virtual] |
| virtual long StringValue::AsInt | ( | ) | const [inline, virtual] |
Attempts to get the value as an int.
This method performs an atoi() on the string and returns the result. If the string does not represent an integer value it will return 0.
Reimplemented from Value.
| virtual double StringValue::AsFloat | ( | ) | const [inline, virtual] |
Attempts to get the value as a float.
This method performs an atof() on the string and returns the result. If the string does not represent a float value it will return 0.
Reimplemented from Value.
1.5.2