interface of a generic value in the Siena data model. More...
#include <types.h>
Public Member Functions | |
virtual | ~value () |
virtual destructor | |
virtual type_id | type () const =0 |
returns the actual type identifier of this value. | |
virtual int_t | int_value () const =0 |
returns this value as an integer. | |
virtual string_t | string_value () const =0 |
returns this value as a string. | |
virtual bool_t | bool_value () const =0 |
returns this value as a boolean. | |
virtual double_t | double_value () const =0 |
returns this value as a double. |
interface of a generic value in the Siena data model.
virtual bool_t siena::value::bool_value | ( | ) | const [pure virtual] |
returns this value as a boolean.
This method returns this value as a boolean if the actual type (returned by type()) is bool_id. The result is undefined if the actual type is not bool_id.
virtual double_t siena::value::double_value | ( | ) | const [pure virtual] |
returns this value as a double.
This method returns this value as a boolean if the actual type (returned by type()) is double_id. The result is undefined if the actual type is not double_id.
virtual int_t siena::value::int_value | ( | ) | const [pure virtual] |
returns this value as an integer.
This method returns this value as an integer if the actual type (returned by type()) is int_id. The result is undefined if the actual type is not int_id.
virtual string_t siena::value::string_value | ( | ) | const [pure virtual] |
returns this value as a string.
This method returns this value as a string if the actual type (returned by type()) is type_id::string_t. The result is undefined if the actual type is not string_t.
virtual type_id siena::value::type | ( | ) | const [pure virtual] |
returns the actual type identifier of this value.