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. More... | |
virtual int_t | int_value () const =0 |
returns this value as an integer. More... | |
virtual string_t | string_value () const =0 |
returns this value as a string. More... | |
virtual bool_t | bool_value () const =0 |
returns this value as a boolean. More... | |
virtual double_t | double_value () const =0 |
returns this value as a double. More... | |
interface of a generic value in the Siena data model.
A value is a typed value.
|
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.
|
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.
|
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.
|
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.
|
pure virtual |
returns the actual type identifier of this value.