Value Associated to a Identifier. More...
#include <rvalue.h>
Collaboration diagram for RValue:
Public Member Functions | |
RValue (void) | |
RValue (size_t id) | |
RValue (size_t id, double val) | |
int | Compare (size_t id) const |
int | Compare (const RValue &obj) const |
RValue & | operator= (const RValue &val) |
RValue & | operator= (const double val) |
operator double () const | |
virtual | ~RValue (void) |
Data Fields | |
size_t | Id |
double | Value |
Static Public Attributes | |
static const RValue | Null |
Detailed Description
Value Associated to a Identifier.
The RValue class provides an association of an identifier and a value.
Constructor & Destructor Documentation
RValue | ( | void | ) |
Default constructor. The identifier is set to cNoRef and the value to NAN.
|
explicit |
Construct a default value.
- Parameters
-
id Identifier.
RValue | ( | size_t | id, |
double | val | ||
) |
Construct a value.
- Parameters
-
id Identifier. val Value.
|
virtual |
Destruct the object.
Member Function Documentation
int Compare | ( | size_t | id | ) | const |
Comparison function.
- Parameters
-
id Identifier to compare with.
int Compare | ( | const RValue & | obj | ) | const |
Comparison function
- Parameters
-
obj Value to compare with.
RValue& operator= | ( | const double | val | ) |
Assignment operator.
- Parameters
-
val Value to assign.
operator double | ( | ) | const |
Automatic conversion to a double (const version).
Field Documentation
|
static |
Represent a null value and an undefined identifier.
size_t Id |
The identifier of the value.
double Value |
Value.