DACLIPS::Value Class Reference

#include <value.h>

List of all members.

Public Member Functions

 Value (Type type)
 Value (float x)
 Value (double x)
 Value (short int x)
 Value (unsigned short int x)
 Value (int x)
 Value (unsigned int x)
 Value (long int x)
 Value (char *x, Type type=TYPE_STRING)
 Value (const std::string &x, Type type=TYPE_STRING)
 Value (void *x, Type type=TYPE_EXTERNAL_ADDRESS)
 Value (const Value &value)
 ~Value ()
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
Valueoperator= (float x)
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
Type set_type (Type type)
sigc::signal< void > signal_changed ()
 Value (Type type)
 Value (float x)
 Value (double x)
 Value (short int x)
 Value (unsigned short int x)
 Value (int x)
 Value (unsigned int x)
 Value (long int x)
 Value (char *x, Type type=TYPE_STRING)
 Value (const std::string &x, Type type=TYPE_STRING)
 Value (void *x, Type type=TYPE_EXTERNAL_ADDRESS)
 Value (const Value &value)
 ~Value ()
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
Valueoperator= (float x)
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
Type set_type (Type type)
sigc::signal< void > signal_changed ()

Protected Member Functions

void deallocate_storage ()
void deallocate_storage ()

Protected Attributes

void * m_value
Type m_clips_type
sigc::signal< void > m_signal_changed


Detailed Description

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

Definition at line 42 of file value.h.


Constructor & Destructor Documentation

DACLIPS::Value::Value ( Type  type  ) 

Typeless constructor

Definition at line 25 of file value.cpp.

DACLIPS::Value::Value ( float  x  ) 

Constructor sets value and CLIPS type to FLOAT

Definition at line 29 of file value.cpp.

DACLIPS::Value::Value ( double  x  ) 

Constructor sets value and CLIPS type to FLOAT

Definition at line 34 of file value.cpp.

DACLIPS::Value::Value ( short int  x  ) 

Constructor sets value and CLIPS type to INTEGER

Definition at line 39 of file value.cpp.

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

Constructor sets value and CLIPS type to INTEGER

Definition at line 44 of file value.cpp.

DACLIPS::Value::Value ( int  x  ) 

Constructor sets value and CLIPS type to INTEGER

Definition at line 49 of file value.cpp.

DACLIPS::Value::Value ( unsigned int  x  ) 

Constructor sets value and CLIPS type to INTEGER

Definition at line 54 of file value.cpp.

DACLIPS::Value::Value ( long int  x  ) 

Constructor sets value and CLIPS type to INTEGER

Definition at line 59 of file value.cpp.

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

Constructor sets value and CLIPS type

Definition at line 64 of file value.cpp.

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

Constructor sets value and CLIPS type

Definition at line 69 of file value.cpp.

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

Constructor sets value and CLIPS type to

Definition at line 74 of file value.cpp.

DACLIPS::Value::Value ( const Value value  ) 

Definition at line 79 of file value.cpp.

DACLIPS::Value::~Value (  ) 

Destructor

Definition at line 83 of file value.cpp.

DACLIPS::Value::Value ( Type  type  ) 

Typeless constructor

DACLIPS::Value::Value ( float  x  ) 

Constructor sets value and CLIPS type to FLOAT

DACLIPS::Value::Value ( double  x  ) 

Constructor sets value and CLIPS type to FLOAT

DACLIPS::Value::Value ( short int  x  ) 

Constructor sets value and CLIPS type to INTEGER

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

Constructor sets value and CLIPS type to INTEGER

DACLIPS::Value::Value ( int  x  ) 

Constructor sets value and CLIPS type to INTEGER

DACLIPS::Value::Value ( unsigned int  x  ) 

Constructor sets value and CLIPS type to INTEGER

DACLIPS::Value::Value ( long int  x  ) 

Constructor sets value and CLIPS type to INTEGER

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

Constructor sets value and CLIPS type

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

Constructor sets value and CLIPS type

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

Constructor sets value and CLIPS type to

DACLIPS::Value::Value ( const Value value  ) 

DACLIPS::Value::~Value (  ) 

Destructor


Member Function Documentation

double DACLIPS::Value::as_float (  )  const

Definition at line 87 of file value.cpp.

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

Definition at line 98 of file value.cpp.

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

Definition at line 109 of file value.cpp.

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

Definition at line 120 of file value.cpp.

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

Definition at line 130 of file value.cpp.

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

Definition at line 134 of file value.cpp.

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

Definition at line 146 of file value.cpp.

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

Definition at line 150 of file value.cpp.

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

Definition at line 154 of file value.cpp.

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

Definition at line 158 of file value.cpp.

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

Definition at line 162 of file value.cpp.

Value & DACLIPS::Value::set ( const std::string &  x,
bool  change_type = false,
Type  type = TYPE_STRING 
)

Definition at line 174 of file value.cpp.

Value & DACLIPS::Value::set ( const char *  x,
bool  change_type = false,
Type  type = TYPE_STRING 
)

Definition at line 186 of file value.cpp.

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

Definition at line 191 of file value.cpp.

DACLIPS::Value::operator float (  )  const

Definition at line 202 of file value.cpp.

DACLIPS::Value::operator double (  )  const

Definition at line 206 of file value.cpp.

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

Definition at line 210 of file value.cpp.

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

Definition at line 214 of file value.cpp.

DACLIPS::Value::operator int (  )  const

Definition at line 218 of file value.cpp.

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

Definition at line 222 of file value.cpp.

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

Definition at line 226 of file value.cpp.

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

Definition at line 230 of file value.cpp.

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

Definition at line 234 of file value.cpp.

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

Definition at line 238 of file value.cpp.

size_t DACLIPS::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.

Definition at line 242 of file value.cpp.

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

Allows assignment to the property from the contained value type.

Definition at line 259 of file value.cpp.

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

Definition at line 263 of file value.cpp.

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

Definition at line 267 of file value.cpp.

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

Definition at line 271 of file value.cpp.

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

Definition at line 275 of file value.cpp.

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

Definition at line 279 of file value.cpp.

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

Definition at line 283 of file value.cpp.

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

Definition at line 287 of file value.cpp.

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

Definition at line 291 of file value.cpp.

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

Definition at line 295 of file value.cpp.

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

Definition at line 299 of file value.cpp.

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

Definition at line 321 of file value.cpp.

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

Definition at line 325 of file value.cpp.

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

Definition at line 329 of file value.cpp.

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

Definition at line 333 of file value.cpp.

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

Definition at line 337 of file value.cpp.

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

Definition at line 341 of file value.cpp.

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

Definition at line 345 of file value.cpp.

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

Definition at line 349 of file value.cpp.

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

Definition at line 353 of file value.cpp.

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

Definition at line 357 of file value.cpp.

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

Definition at line 361 of file value.cpp.

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

Definition at line 365 of file value.cpp.

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

Definition at line 369 of file value.cpp.

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

Definition at line 373 of file value.cpp.

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

Definition at line 377 of file value.cpp.

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

Definition at line 381 of file value.cpp.

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

Definition at line 385 of file value.cpp.

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

Definition at line 389 of file value.cpp.

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

Definition at line 393 of file value.cpp.

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

Definition at line 397 of file value.cpp.

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

Definition at line 401 of file value.cpp.

Type DACLIPS::Value::set_type ( Type  type  ) 

Sets the underlying storage type

Definition at line 405 of file value.cpp.

sigc::signal< void > DACLIPS::Value::signal_changed (  ) 

Signal emitted when the value is changed.

Definition at line 430 of file value.cpp.

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

Definition at line 434 of file value.cpp.

double DACLIPS::Value::as_float (  )  const

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

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

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

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

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

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

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

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

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

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

Value& DACLIPS::Value::set ( const std::string &  x,
bool  change_type = false,
Type  type = TYPE_STRING 
)

Value& DACLIPS::Value::set ( const char *  x,
bool  change_type = false,
Type  type = TYPE_STRING 
)

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

DACLIPS::Value::operator float (  )  const

DACLIPS::Value::operator double (  )  const

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

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

DACLIPS::Value::operator int (  )  const

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

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

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

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

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

size_t DACLIPS::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.

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

Allows assignment to the property from the contained value type.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Type DACLIPS::Value::set_type ( Type  type  ) 

Sets the underlying storage type

sigc::signal<void> DACLIPS::Value::signal_changed (  ) 

Signal emitted when the value is changed.

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


Member Data Documentation

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

Storage for the underlying value

Definition at line 254 of file value.h.

Stores the CLIPS type information

Definition at line 257 of file value.h.

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

Signal emitted when underlying data is changed.

Definition at line 260 of file value.h.


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

Generated on Mon Jan 10 22:33:44 2011 by  doxygen 1.5.6