clipsmm - C++ CLIPS Interface Library

clipsmm logo

CLIPS::Value Class Reference

#include <value.h>

List of all members.

Public Member Functions

 Value (Type type)
 Typeless constructor.
 Value (float x)
 Constructor sets value and CLIPS type to FLOAT.
 Value (double x)
 Constructor sets value and CLIPS type to FLOAT.
 Value (short int x)
 Constructor sets value and CLIPS type to INTEGER.
 Value (unsigned short int x)
 Constructor sets value and CLIPS type to INTEGER.
 Value (int x)
 Constructor sets value and CLIPS type to INTEGER.
 Value (unsigned int x)
 Constructor sets value and CLIPS type to INTEGER.
 Value (long int x)
 Constructor sets value and CLIPS type to INTEGER.
 Value (char *x, Type type=TYPE_STRING)
 Constructor sets value and CLIPS type.
 Value (const std::string &x, Type type=TYPE_STRING)
 Constructor sets value and CLIPS type.
 Value (void *x, Type type=TYPE_EXTERNAL_ADDRESS)
 Constructor sets value and CLIPS type to.
 Value (const Value &value)
 ~Value ()
 Destructor.
double as_float () const
long int as_integer () const
std::string & as_string () const
void * as_address () const
Valueset (float x, bool change_type=false)
Valueset (double x, bool change_type=false)
Valueset (short int x, bool change_type=false)
Valueset (unsigned short int x, bool change_type=false)
Valueset (int x, bool change_type=false)
Valueset (unsigned int x, bool change_type=false)
Valueset (long int x, bool change_type=false)
Valueset (const std::string &x, bool change_type=false, Type type=TYPE_STRING)
Valueset (const char *x, bool change_type=false, Type type=TYPE_STRING)
Valueset (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 std::string & () const
 operator const char * () const
 operator void * () const
size_t size () const
 Function call syntax to get the value with var() notation.
Valueoperator= (float x)
 Allows assignment to the property from the contained value type.
Valueoperator= (double x)
Valueoperator= (short int x)
Valueoperator= (unsigned short int x)
Valueoperator= (int x)
Valueoperator= (unsigned int x)
Valueoperator= (long int x)
Valueoperator= (const std::string &x)
Valueoperator= (const char *x)
Valueoperator= (void *x)
Valueoperator= (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== (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!= (const std::string &x) const
bool operator!= (const char *x) const
bool operator!= (void *x) const
Type type () const
 Arithmetic assignment operator.
Type set_type (Type type)
 Sets the underlying storage type.
sigc::signal< void > signal_changed ()
 Signal emitted when the value is changed.

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.


Detailed Description

Author:
Rick L. Vinyard, Jr. <rvinyard@cs.nmsu.edu>

Constructor & Destructor Documentation

CLIPS::Value::Value ( Type  type  ) 

Typeless constructor.

References set_type().

CLIPS::Value::Value ( float  x  ) 

Constructor sets value and CLIPS type to FLOAT.

References set_type(), and CLIPS::TYPE_FLOAT.

CLIPS::Value::Value ( double  x  ) 

Constructor sets value and CLIPS type to FLOAT.

References set_type(), and CLIPS::TYPE_FLOAT.

CLIPS::Value::Value ( short int  x  ) 

Constructor sets value and CLIPS type to INTEGER.

References set_type(), and CLIPS::TYPE_INTEGER.

CLIPS::Value::Value ( unsigned short int  x  ) 

Constructor sets value and CLIPS type to INTEGER.

References set_type(), and CLIPS::TYPE_INTEGER.

CLIPS::Value::Value ( int  x  ) 

Constructor sets value and CLIPS type to INTEGER.

References set_type(), and CLIPS::TYPE_INTEGER.

CLIPS::Value::Value ( unsigned int  x  ) 

Constructor sets value and CLIPS type to INTEGER.

References set_type(), and CLIPS::TYPE_INTEGER.

CLIPS::Value::Value ( long int  x  ) 

Constructor sets value and CLIPS type to INTEGER.

References set_type(), and CLIPS::TYPE_INTEGER.

CLIPS::Value::Value ( char *  x,
Type  type = TYPE_STRING 
)

Constructor sets value and CLIPS type.

References set_type().

CLIPS::Value::Value ( const std::string &  x,
Type  type = TYPE_STRING 
)

Constructor sets value and CLIPS type.

References set_type().

CLIPS::Value::Value ( void *  x,
Type  type = TYPE_EXTERNAL_ADDRESS 
)

Constructor sets value and CLIPS type to.

References set_type().

CLIPS::Value::Value ( const Value value  ) 

References operator=().

CLIPS::Value::~Value (  ) 

Destructor.

References deallocate_storage().


Member Function Documentation

void * CLIPS::Value::as_address (  )  const

double CLIPS::Value::as_float (  )  const

long int CLIPS::Value::as_integer (  )  const

std::string & CLIPS::Value::as_string (  )  const

void CLIPS::Value::deallocate_storage (  )  [protected]

CLIPS::Value::operator const char * (  )  const

References as_string().

CLIPS::Value::operator double (  )  const

References as_float().

CLIPS::Value::operator float (  )  const

References as_float().

CLIPS::Value::operator int (  )  const

References as_integer().

CLIPS::Value::operator long int (  )  const

References as_integer().

CLIPS::Value::operator short int (  )  const

References as_integer().

CLIPS::Value::operator std::string & (  )  const

References as_string().

CLIPS::Value::operator unsigned int (  )  const

References as_integer().

CLIPS::Value::operator unsigned short int (  )  const

References as_integer().

CLIPS::Value::operator void * (  )  const

References as_address().

bool CLIPS::Value::operator!= ( void *  x  )  const

References as_address().

bool CLIPS::Value::operator!= ( const char *  x  )  const

References as_string().

bool CLIPS::Value::operator!= ( const std::string &  x  )  const

References as_string().

bool CLIPS::Value::operator!= ( long int  x  )  const

References as_integer().

bool CLIPS::Value::operator!= ( unsigned int  x  )  const

References as_integer().

bool CLIPS::Value::operator!= ( int  x  )  const

References as_integer().

bool CLIPS::Value::operator!= ( unsigned short int  x  )  const

References as_integer().

bool CLIPS::Value::operator!= ( short int  x  )  const

References as_integer().

bool CLIPS::Value::operator!= ( double  x  )  const

References as_float().

bool CLIPS::Value::operator!= ( float  x  )  const

References as_float().

Value & CLIPS::Value::operator= ( const Value x  ) 

Value & CLIPS::Value::operator= ( void *  x  ) 

Value & CLIPS::Value::operator= ( const char *  x  ) 

Value & CLIPS::Value::operator= ( const std::string &  x  ) 

Value & CLIPS::Value::operator= ( long int  x  ) 

Value & CLIPS::Value::operator= ( unsigned int  x  ) 

Value & CLIPS::Value::operator= ( int  x  ) 

Value & CLIPS::Value::operator= ( unsigned short int  x  ) 

Value & CLIPS::Value::operator= ( short int  x  ) 

Value & CLIPS::Value::operator= ( double  x  ) 

Value & CLIPS::Value::operator= ( float  x  ) 

Allows assignment to the property from the contained value type.

Referenced by Value().

bool CLIPS::Value::operator== ( void *  x  )  const

References as_address().

bool CLIPS::Value::operator== ( const char *  x  )  const

References as_string().

bool CLIPS::Value::operator== ( const std::string &  x  )  const

References as_string().

bool CLIPS::Value::operator== ( long int  x  )  const

References as_integer().

bool CLIPS::Value::operator== ( unsigned int  x  )  const

References as_integer().

bool CLIPS::Value::operator== ( int  x  )  const

References as_integer().

bool CLIPS::Value::operator== ( unsigned short int  x  )  const

References as_integer().

bool CLIPS::Value::operator== ( short int  x  )  const

References as_integer().

bool CLIPS::Value::operator== ( double  x  )  const

References as_float().

bool CLIPS::Value::operator== ( float  x  )  const

References as_float().

Value & CLIPS::Value::set ( void *  x,
bool  change_type = false,
Type  type = TYPE_EXTERNAL_ADDRESS 
)

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 
)

Value & CLIPS::Value::set ( long int  x,
bool  change_type = false 
)

Value & CLIPS::Value::set ( unsigned int  x,
bool  change_type = false 
)

Value & CLIPS::Value::set ( int  x,
bool  change_type = false 
)

Value & CLIPS::Value::set ( unsigned short int  x,
bool  change_type = false 
)

Value & CLIPS::Value::set ( short int  x,
bool  change_type = false 
)

Value & CLIPS::Value::set ( double  x,
bool  change_type = false 
)

Value & CLIPS::Value::set ( float  x,
bool  change_type = false 
)

Type CLIPS::Value::set_type ( Type  type  ) 

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 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:

  • So that it will work with a variety of operands
  • So that a stub will not be generated if the operator is not defined for T

T + X must be well defined Arithmetic assignment operator This method is implemented as a template for two reasons:

  • So that it will work with a variety of operands
  • So that a stub will not be generated if the operator is not defined for T

T - X must be well defined Arithmetic assignment operator This method is implemented as a template for two reasons:

  • So that it will work with a variety of operands
  • So that a stub will not be generated if the operator is not defined for T

T * X must be well defined Arithmetic assignment operator This method is implemented as a template for two reasons:

  • So that it will work with a variety of operands
  • So that a stub will not be generated if the operator is not defined for T

T / X must be well defined Arithmetic assignment operator This method is implemented as a template for two reasons:

  • So that it will work with a variety of operands
  • So that a stub will not be generated if the operator is not defined for T

T % X must be well defined Returns the CLIPS library type of this value

References m_clips_type.

Referenced by CLIPS::value_to_data_object().


Member Data Documentation

sigc::signal<void> CLIPS::Value::m_signal_changed [protected]

Signal emitted when underlying data is changed.

Referenced by set(), and signal_changed().

void* CLIPS::Value::m_value [protected]

Storage for the underlying value.

Referenced by as_address(), as_float(), as_integer(), as_string(), deallocate_storage(), operator=(), set(), set_type(), and size().


The documentation for this class was generated from the following files:

Generated on Wed Jul 29 12:04:15 2009 for clipsmm by doxygen 1.5.8