#include <value.h>
Collaboration diagram for Value:

Public Types | |
| enum | ValueType { NULL_VALUE = 0, ERROR_VALUE = 1<<0, UNDEFINED_VALUE = 1<<1, BOOLEAN_VALUE = 1<<2, INTEGER_VALUE = 1<<3, REAL_VALUE = 1<<4, RELATIVE_TIME_VALUE = 1<<5, ABSOLUTE_TIME_VALUE = 1<<6, STRING_VALUE = 1<<7, CLASSAD_VALUE = 1<<8, LIST_VALUE = 1<<9 } |
| Value types. More... | |
| enum | NumberFactor { NO_FACTOR = 0, B_FACTOR = 1, K_FACTOR = 2, M_FACTOR = 3, G_FACTOR = 4, T_FACTOR = 5 } |
| Number factors. More... | |
Public Member Functions | |
| Value () | |
| Constructor. | |
| Value (const Value &value) | |
| Copy Constructor. | |
| ~Value () | |
| Destructor. | |
| Value & | operator= (const Value &value) |
| Assignment operator. | |
| void | Clear (void) |
| Discards the previous value and sets the value to UNDEFINED. | |
| void | CopyFrom (const Value &v) |
| Copies the value of another value object. | |
| void | SetBooleanValue (bool b) |
| Sets a boolean value; previous value discarded. | |
| void | SetRealValue (double r) |
| Sets a real value; previous value discarded. | |
| void | SetIntegerValue (int i) |
| Sets an integer value; previous value discarded. | |
| void | SetUndefinedValue (void) |
| Sets the undefined value; previous value discarded. | |
| void | SetErrorValue (void) |
| Sets the error value; previous value discarded. | |
| void | SetListValue (ExprList *l) |
| Sets an expression list value; previous value discarded. | |
| void | SetClassAdValue (ClassAd *c) |
| Sets a ClassAd value; previous value discarded. | |
| void | SetStringValue (const std::string &str) |
| Sets a string value; previous value discarded. | |
| void | SetStringValue (const char *str) |
| Sets a string value; previous value discarded. | |
| void | SetAbsoluteTimeValue (abstime_t secs) |
| Sets an absolute time value in seconds since the UNIX epoch, & the time zone it's measured in. | |
| void | SetRelativeTimeValue (time_t secs) |
| Sets a relative time value. | |
| void | SetRelativeTimeValue (double secs) |
| ValueType | GetType () const |
| Gets the type of the value. | |
| bool | IsBooleanValue (bool &b) const |
| Checks if the value is boolean. | |
| bool | IsBooleanValue () const |
| Checks if the value is boolean. | |
| bool | IsIntegerValue (int &i) const |
| Checks if the value is integral. | |
| bool | IsIntegerValue () const |
| Checks if the value is integral. | |
| bool | IsRealValue (double &r) const |
| Checks if the value is real. | |
| bool | IsRealValue () const |
| Checks if the value is real. | |
| bool | IsStringValue (std::string &str) const |
| Checks if the value is a string. | |
| bool | IsStringValue (const char *&str) const |
| Checks if the value is a string. | |
| bool | IsStringValue (char *str, int len) const |
| Checks if the value is a string and provides a copy of it in a buffer you provide. | |
| bool | IsStringValue () const |
| Checks if the value is a string. | |
| bool | IsListValue (const ExprList *&l) const |
| Checks if the value is an expression list. | |
| bool | IsListValue (ExprList *&l) |
| Checks if the value is an expression list. | |
| bool | IsListValue () const |
| Checks if the value is an expression list. | |
| bool | IsClassAdValue (const ClassAd *&c) const |
| Checks if the value is a ClassAd. | |
| bool | IsClassAdValue (ClassAd *&c) |
| Checks if the value is a ClassAd. | |
| bool | IsClassAdValue () const |
| Checks if the value is a ClassAd. | |
| bool | IsUndefinedValue () const |
| Checks if the value is the undefined value. | |
| bool | IsErrorValue () const |
| Checks if the value is the error value. | |
| bool | IsExceptional () const |
| Checks if the value is exceptional. | |
| bool | IsNumber () const |
| Checks if the value is numerical. | |
| bool | IsNumber (int &i) const |
| Checks if the value is numerical. | |
| bool | IsNumber (double &r) const |
| Checks if the value is numerical. | |
| bool | IsAbsoluteTimeValue () const |
| Checks if the value is an absolute time value. | |
| bool | IsAbsoluteTimeValue (abstime_t &secs) const |
| Checks if the value is an absolute time value. | |
| bool | IsRelativeTimeValue () const |
| Checks if the value is a relative time value. | |
| bool | IsRelativeTimeValue (double &secs) const |
| Checks if the value is a relative time value. | |
| bool | IsRelativeTimeValue (time_t &secs) const |
| bool | SameAs (const Value &otherValue) const |
Static Public Attributes | |
| const double | ScaleFactor [] |
| Values of number multiplication factors. | |
Friends | |
| class | Literal |
| class | ClassAd |
| class | ExprTree |
| bool | operator== (const Value &value1, const Value &value2) |
| std::ostream & | operator<< (std::ostream &stream, Value &value) |
|
|
Number factors.
|
|
|
|
Copies the value of another value object.
|
|
|
Gets the type of the value.
|
|
|
Checks if the value is an absolute time value.
|
|
|
Checks if the value is an absolute time value.
|
|
|
Checks if the value is boolean.
|
|
|
Checks if the value is boolean.
|
|
|
Checks if the value is a ClassAd.
|
|
|
Checks if the value is a ClassAd. The ClassAd returned is the original list put into the ClassAd, so you only own it if you own the original.
|
|
|
Checks if the value is a ClassAd.
|
|
|
Checks if the value is the error value.
|
|
|
Checks if the value is exceptional.
|
|
|
Checks if the value is integral.
|
|
|
Checks if the value is integral.
|
|
|
Checks if the value is an expression list. The ExprList returned is the original list put into the ClassAd, so you only own it if you own the original.
|
|
|
Checks if the value is an expression list. The ExprList returned is the original list put into the ClassAd, so you only own it if you own the original.
|
|
|
Checks if the value is an expression list.
|
|
|
Checks if the value is numerical. If the value is an integer, it is promoted to a real.
|
|
|
Checks if the value is numerical. If the value is a real, it is converted to an integer through truncation.
|
|
|
Checks if the value is numerical.
|
|
|
Checks if the value is real.
|
|
|
Checks if the value is real.
|
|
|
Checks if the value is a relative time value.
|
|
|
Checks if the value is a relative time value.
|
|
|
Checks if the value is a string.
|
|
||||||||||||
|
Checks if the value is a string and provides a copy of it in a buffer you provide.
|
|
|
Checks if the value is a string.
|
|
|
Checks if the value is a string.
|
|
|
Checks if the value is the undefined value.
|
|
|
Sets an absolute time value in seconds since the UNIX epoch, & the time zone it's measured in.
|
|
|
Sets a boolean value; previous value discarded.
|
|
|
Sets a ClassAd value; previous value discarded. You still own the ClassA:, it is not owned by the Value class, so it is your responsibility to delete it.
|
|
|
Sets the error value; previous value discarded.
|
|
|
Sets an integer value; previous value discarded.
|
|
|
Sets an expression list value; previous value discarded. You still own the ExprList:: it is not owned by the Value class, so it is your responsibility to delete it.
|
|
|
Sets a real value; previous value discarded.
|
|
|
Sets a relative time value.
|
|
|
Sets a string value; previous value discarded. The string is copied so you may feel free to delete the original if you wish.
|
|
|
Sets a string value; previous value discarded.
|
|
|
Sets the undefined value; previous value discarded.
|