#include <value.h>
Inherits sigc::trackable.
Protected Member Functions | |
void | deallocate_storage () |
Protected Attributes | |
void * | m_value |
Storage for the underlying value. | |
Type | m_clips_type |
Stores the CLIPS type information. | |
sigc::signal< void > | m_signal_changed |
Signal emitted when underlying data is changed. | |
CLIPS::Value::Value | ( | ) |
Typeless constructor.
References set_type(), and CLIPS::TYPE_UNKNOWN.
CLIPS::Value::Value | ( | Type | type | ) |
Type constructor.
References set_type().
CLIPS::Value::Value | ( | float | x | ) |
Constructor sets value and CLIPS type to FLOAT.
References set(), set_type(), and CLIPS::TYPE_FLOAT.
CLIPS::Value::Value | ( | double | x | ) |
Constructor sets value and CLIPS type to FLOAT.
References set(), set_type(), and CLIPS::TYPE_FLOAT.
Constructor sets value and CLIPS type to INTEGER.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
Constructor sets value and CLIPS type to INTEGER.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
CLIPS::Value::Value | ( | int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
Constructor sets value and CLIPS type to INTEGER.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
Constructor sets value and CLIPS type to INTEGER.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
Constructor sets value and CLIPS type to INTEGER.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
CLIPS::Value::Value | ( | const char * | x, |
Type | type = TYPE_STRING ) |
Constructor sets value and CLIPS type.
References set(), and set_type().
CLIPS::Value::Value | ( | const std::string & | x, |
Type | type = TYPE_STRING ) |
Constructor sets value and CLIPS type.
References set(), and set_type().
CLIPS::Value::Value | ( | void * | x, |
Type | type = TYPE_EXTERNAL_ADDRESS ) |
Constructor sets value and CLIPS type to.
References set(), and set_type().
References operator=().
CLIPS::Value::~Value | ( | ) |
Destructor.
References deallocate_storage().
void * CLIPS::Value::as_address | ( | ) | const |
References m_clips_type, m_value, CLIPS::TYPE_EXTERNAL_ADDRESS, and CLIPS::TYPE_INSTANCE_ADDRESS.
Referenced by operator!=(), operator==(), and CLIPS::value_to_data_object_rawenv().
double CLIPS::Value::as_float | ( | ) | const |
References m_clips_type, m_value, CLIPS::TYPE_FLOAT, and CLIPS::TYPE_INTEGER.
Referenced by operator!=(), operator!=(), operator==(), operator==(), and CLIPS::value_to_data_object_rawenv().
References m_clips_type, m_value, CLIPS::TYPE_FLOAT, and CLIPS::TYPE_INTEGER.
Referenced by operator!=(), operator!=(), operator!=(), operator!=(), operator!=(), operator!=(), operator==(), operator==(), operator==(), operator==(), operator==(), operator==(), and CLIPS::value_to_data_object_rawenv().
std::string & CLIPS::Value::as_string | ( | ) | const |
References m_clips_type, m_value, CLIPS::TYPE_INSTANCE_NAME, CLIPS::TYPE_STRING, and CLIPS::TYPE_SYMBOL.
Referenced by operator!=(), operator!=(), operator==(), operator==(), and CLIPS::value_to_data_object_rawenv().
|
protected |
References CLIPSPointer, m_clips_type, m_value, CLIPS::TYPE_EXTERNAL_ADDRESS, CLIPS::TYPE_FLOAT, CLIPS::TYPE_INSTANCE_ADDRESS, CLIPS::TYPE_INSTANCE_NAME, CLIPS::TYPE_INTEGER, CLIPS::TYPE_STRING, and CLIPS::TYPE_SYMBOL.
Referenced by set_type(), and ~Value().
CLIPS::Value::operator double | ( | ) | const |
CLIPS::Value::operator float | ( | ) | const |
CLIPS::Value::operator int | ( | ) | const |
CLIPS::Value::operator std::string & | ( | ) | const |
CLIPS::Value::operator void * | ( | ) | const |
References as_string(), and CLIPSPointer.
References as_string(), and CLIPSPointer.
References as_float(), and CLIPSPointer.
References as_float(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_address(), and CLIPSPointer.
References as_string(), and CLIPSPointer.
References as_string(), and CLIPSPointer.
References as_float(), and CLIPSPointer.
References as_float(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_integer(), and CLIPSPointer.
References as_address(), and CLIPSPointer.
References CLIPSPointer, set(), and type().
Value & CLIPS::Value::set | ( | const std::string & | x, |
bool | change_type = false, | ||
Type | type = TYPE_STRING ) |
References CLIPSPointer, m_clips_type, m_signal_changed, m_value, set_type(), CLIPS::TYPE_INSTANCE_NAME, CLIPS::TYPE_STRING, and CLIPS::TYPE_SYMBOL.
References CLIPSPointer, m_clips_type, m_signal_changed, m_value, set(), set_type(), CLIPS::TYPE_FLOAT, and CLIPS::TYPE_INTEGER.
References CLIPSPointer, and set().
Referenced by operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), operator=(), set(), set(), set(), set(), set(), set(), set(), set(), set(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), and Value().
References CLIPSPointer, and set().
References CLIPSPointer, m_clips_type, m_signal_changed, m_value, set(), set_type(), CLIPS::TYPE_FLOAT, and CLIPS::TYPE_INTEGER.
References CLIPSPointer, and set().
References CLIPSPointer, and set().
References CLIPSPointer, and set().
Sets the underlying storage type.
References CLIPSPointer, deallocate_storage(), m_clips_type, m_value, type(), CLIPS::TYPE_EXTERNAL_ADDRESS, CLIPS::TYPE_FLOAT, CLIPS::TYPE_INSTANCE_ADDRESS, CLIPS::TYPE_INSTANCE_NAME, CLIPS::TYPE_INTEGER, CLIPS::TYPE_STRING, and CLIPS::TYPE_SYMBOL.
Referenced by operator=(), set(), set(), set(), set(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), Value(), and Value().
sigc::signal< void > CLIPS::Value::signal_changed | ( | ) |
Signal emitted when the value is changed.
References m_signal_changed.
size_t CLIPS::Value::size | ( | ) | const |
Function call syntax to get the value with var() notation.
Function call syntax to set the value with var(value) notation. Returns the RTTI type id of the contained type Returns the size in bytes of the contained type, and not necessarily the size of this class.
References CLIPSPointer, m_clips_type, m_value, CLIPS::TYPE_EXTERNAL_ADDRESS, CLIPS::TYPE_FLOAT, CLIPS::TYPE_INSTANCE_ADDRESS, CLIPS::TYPE_INSTANCE_NAME, CLIPS::TYPE_INTEGER, CLIPS::TYPE_STRING, and CLIPS::TYPE_SYMBOL.
Type CLIPS::Value::type | ( | ) | const |
Arithmetic assignment operator.
This method is implemented as a template for two reasons:
T + X must be well defined Arithmetic assignment operator
This method is implemented as a template for two reasons:
T - X must be well defined Arithmetic assignment operator
This method is implemented as a template for two reasons:
T * X must be well defined Arithmetic assignment operator
This method is implemented as a template for two reasons:
T / X must be well defined Arithmetic assignment operator
This method is implemented as a template for two reasons:
T % X must be well defined Returns the CLIPS library type of this value
References m_clips_type.
Referenced by set(), set_type(), and CLIPS::value_to_data_object_rawenv().
|
protected |
Stores the CLIPS type information.
Referenced by as_address(), as_float(), as_integer(), as_string(), deallocate_storage(), operator=(), set(), set(), set(), set(), set_type(), size(), and type().
|
protected |
Signal emitted when underlying data is changed.
Referenced by set(), set(), set(), set(), and signal_changed().
|
protected |
Storage for the underlying value.
Referenced by as_address(), as_float(), as_integer(), as_string(), deallocate_storage(), operator=(), set(), set(), set(), set(), set_type(), and size().