#include <value.h>
Inherits trackable.
Public Member Functions | |
Value () | |
Typeless constructor. More... | |
Value (Type type) | |
Type constructor. More... | |
Value (float x) | |
Constructor sets value and CLIPS type to FLOAT. More... | |
Value (double x) | |
Constructor sets value and CLIPS type to FLOAT. More... | |
Value (short int x) | |
Constructor sets value and CLIPS type to INTEGER. More... | |
Value (unsigned short int x) | |
Constructor sets value and CLIPS type to INTEGER. More... | |
Value (int x) | |
Constructor sets value and CLIPS type to INTEGER. More... | |
Value (unsigned int x) | |
Constructor sets value and CLIPS type to INTEGER. More... | |
Value (long int x) | |
Constructor sets value and CLIPS type to INTEGER. More... | |
Value (long long int x) | |
Constructor sets value and CLIPS type to INTEGER. More... | |
Value (const char *x, Type type=TYPE_STRING) | |
Constructor sets value and CLIPS type. More... | |
Value (const std::string &x, Type type=TYPE_STRING) | |
Constructor sets value and CLIPS type. More... | |
Value (void *x, Type type=TYPE_EXTERNAL_ADDRESS) | |
Constructor sets value and CLIPS type to. More... | |
Value (const Value &value) | |
~Value () | |
Destructor. More... | |
double | as_float () const |
long long int | as_integer () const |
std::string & | as_string () const |
void * | as_address () const |
Value & | set (float x, bool change_type=false) |
Value & | set (double x, bool change_type=false) |
Value & | set (short int x, bool change_type=false) |
Value & | set (unsigned short int x, bool change_type=false) |
Value & | set (int x, bool change_type=false) |
Value & | set (unsigned int x, bool change_type=false) |
Value & | set (long int x, bool change_type=false) |
Value & | set (long long int x, bool change_type=false) |
Value & | set (const std::string &x, bool change_type=false, Type type=TYPE_STRING) |
Value & | set (const char *x, bool change_type=false, Type type=TYPE_STRING) |
Value & | set (void *x, bool change_type=false, Type type=TYPE_EXTERNAL_ADDRESS) |
operator float () const | |
operator double () const | |
operator short int () const | |
operator unsigned short int () const | |
operator int () const | |
operator unsigned int () const | |
operator long int () const | |
operator long long int () const | |
operator std::string & () const | |
operator const char * () const | |
operator void * () const | |
size_t | size () const |
Function call syntax to get the value with var() notation. More... | |
Value & | operator= (float x) |
Allows assignment to the property from the contained value type. More... | |
Value & | operator= (double x) |
Value & | operator= (short int x) |
Value & | operator= (unsigned short int x) |
Value & | operator= (int x) |
Value & | operator= (unsigned int x) |
Value & | operator= (long int x) |
Value & | operator= (long long int x) |
Value & | operator= (const std::string &x) |
Value & | operator= (const char *x) |
Value & | operator= (void *x) |
Value & | operator= (const Value &x) |
bool | operator== (float x) const |
bool | operator== (double x) const |
bool | operator== (short int x) const |
bool | operator== (unsigned short int x) const |
bool | operator== (int x) const |
bool | operator== (unsigned int x) const |
bool | operator== (long int x) const |
bool | operator== (long long int x) const |
bool | operator== (const std::string &x) const |
bool | operator== (const char *x) const |
bool | operator== (void *x) const |
bool | operator!= (float x) const |
bool | operator!= (double x) const |
bool | operator!= (short int x) const |
bool | operator!= (unsigned short int x) const |
bool | operator!= (int x) const |
bool | operator!= (unsigned int x) const |
bool | operator!= (long int x) const |
bool | operator!= (long long int x) const |
bool | operator!= (const std::string &x) const |
bool | operator!= (const char *x) const |
bool | operator!= (void *x) const |
Type | type () const |
Arithmetic assignment operator. More... | |
Type | set_type (Type type) |
Sets the underlying storage type. More... | |
sigc::signal< void > | signal_changed () |
Signal emitted when the value is changed. More... | |
Protected Member Functions | |
void | deallocate_storage () |
Protected Attributes | |
void * | m_value |
Storage for the underlying value. More... | |
Type | m_clips_type |
Stores the CLIPS type information. More... | |
sigc::signal< void > | m_signal_changed |
Signal emitted when underlying data is changed. More... | |
CLIPS::Value::Value | ( | ) |
Typeless constructor.
References set(), set_type(), and CLIPS::TYPE_INTEGER.
CLIPS::Value::Value | ( | Type | type | ) |
Type constructor.
CLIPS::Value::Value | ( | float | x | ) |
Constructor sets value and CLIPS type to FLOAT.
CLIPS::Value::Value | ( | double | x | ) |
Constructor sets value and CLIPS type to FLOAT.
CLIPS::Value::Value | ( | short int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
CLIPS::Value::Value | ( | unsigned short int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
CLIPS::Value::Value | ( | int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
CLIPS::Value::Value | ( | unsigned int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
CLIPS::Value::Value | ( | long int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
CLIPS::Value::Value | ( | long long int | x | ) |
Constructor sets value and CLIPS type to INTEGER.
CLIPS::Value::Value | ( | const char * | x, |
Type | type = TYPE_STRING |
||
) |
Constructor sets value and CLIPS type.
CLIPS::Value::Value | ( | const std::string & | x, |
Type | type = TYPE_STRING |
||
) |
Constructor sets value and CLIPS type.
References m_clips_type, m_value, and CLIPS::TYPE_FLOAT.
CLIPS::Value::Value | ( | void * | x, |
Type | type = TYPE_EXTERNAL_ADDRESS |
||
) |
Constructor sets value and CLIPS type to.
CLIPS::Value::Value | ( | const Value & | value | ) |
CLIPS::Value::~Value | ( | ) |
Destructor.
void * CLIPS::Value::as_address | ( | ) | const |
double CLIPS::Value::as_float | ( | ) | const |
long long int CLIPS::Value::as_integer | ( | ) | const |
std::string & CLIPS::Value::as_string | ( | ) | const |
|
protected |
CLIPS::Value::operator const char * | ( | ) | const |
CLIPS::Value::operator double | ( | ) | const |
CLIPS::Value::operator float | ( | ) | const |
CLIPS::Value::operator int | ( | ) | const |
CLIPS::Value::operator long int | ( | ) | const |
CLIPS::Value::operator long long int | ( | ) | const |
References CLIPS::TYPE_FLOAT, and CLIPS::TYPE_INTEGER.
CLIPS::Value::operator short int | ( | ) | const |
CLIPS::Value::operator std::string & | ( | ) | const |
CLIPS::Value::operator unsigned int | ( | ) | const |
CLIPS::Value::operator unsigned short int | ( | ) | const |
CLIPS::Value::operator void * | ( | ) | const |
bool CLIPS::Value::operator!= | ( | const char * | x | ) | const |
References m_value, and CLIPS::TYPE_FLOAT.
bool CLIPS::Value::operator!= | ( | const std::string & | x | ) | const |
bool CLIPS::Value::operator!= | ( | double | x | ) | const |
bool CLIPS::Value::operator!= | ( | float | x | ) | const |
bool CLIPS::Value::operator!= | ( | int | x | ) | const |
bool CLIPS::Value::operator!= | ( | long int | x | ) | const |
bool CLIPS::Value::operator!= | ( | long long int | x | ) | const |
bool CLIPS::Value::operator!= | ( | short int | x | ) | const |
bool CLIPS::Value::operator!= | ( | unsigned int | x | ) | const |
bool CLIPS::Value::operator!= | ( | unsigned short int | x | ) | const |
bool CLIPS::Value::operator!= | ( | void * | x | ) | const |
Value & CLIPS::Value::operator= | ( | const char * | x | ) |
Value & CLIPS::Value::operator= | ( | const std::string & | x | ) |
Value & CLIPS::Value::operator= | ( | double | x | ) |
Value & CLIPS::Value::operator= | ( | float | x | ) |
Allows assignment to the property from the contained value type.
Value & CLIPS::Value::operator= | ( | int | x | ) |
Value & CLIPS::Value::operator= | ( | long int | x | ) |
Value & CLIPS::Value::operator= | ( | long long int | x | ) |
Value & CLIPS::Value::operator= | ( | short int | x | ) |
Value & CLIPS::Value::operator= | ( | unsigned int | x | ) |
Value & CLIPS::Value::operator= | ( | unsigned short int | x | ) |
Value & CLIPS::Value::operator= | ( | void * | x | ) |
bool CLIPS::Value::operator== | ( | const char * | x | ) | const |
bool CLIPS::Value::operator== | ( | const std::string & | x | ) | const |
bool CLIPS::Value::operator== | ( | double | x | ) | const |
bool CLIPS::Value::operator== | ( | float | x | ) | const |
bool CLIPS::Value::operator== | ( | int | x | ) | const |
bool CLIPS::Value::operator== | ( | long int | x | ) | const |
bool CLIPS::Value::operator== | ( | long long int | x | ) | const |
bool CLIPS::Value::operator== | ( | short int | x | ) | const |
bool CLIPS::Value::operator== | ( | unsigned int | x | ) | const |
bool CLIPS::Value::operator== | ( | unsigned short int | x | ) | const |
bool CLIPS::Value::operator== | ( | void * | x | ) | const |
Value & CLIPS::Value::set | ( | const char * | x, |
bool | change_type = false , |
||
Type | type = TYPE_STRING |
||
) |
Value & CLIPS::Value::set | ( | const std::string & | x, |
bool | change_type = false , |
||
Type | type = TYPE_STRING |
||
) |
References m_clips_type, m_signal_changed, m_value, set_type(), CLIPS::TYPE_EXTERNAL_ADDRESS, and CLIPS::TYPE_INSTANCE_ADDRESS.
Value & CLIPS::Value::set | ( | double | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | int | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | long int | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | long long int | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | short int | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | unsigned int | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | unsigned short int | x, |
bool | change_type = false |
||
) |
Value & CLIPS::Value::set | ( | void * | x, |
bool | change_type = false , |
||
Type | type = TYPE_EXTERNAL_ADDRESS |
||
) |
sigc::signal< void > CLIPS::Value::signal_changed | ( | ) |
Signal emitted when the value is changed.
size_t CLIPS::Value::size | ( | ) | const |
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
|
protected |
|
protected |
Signal emitted when underlying data is changed.
Referenced by set().
|
protected |
Storage for the underlying value.
Referenced by operator!=(), set(), and Value().