In file value.h:

class Value

Represents the result of an evaluation.

Public Classes

enum NumberFactor
Number factors
NO_FACTOR
No factor specified
B_FACTOR
Byte factor
K_FACTOR
Kilo factor
M_FACTOR
Mega factor
G_FACTOR
Giga factor
T_FACTOR
Terra factor
enum ValueType
Value types
ERROR_VALUE
The error value
UNDEFINED_VALUE
The undefined value
BOOLEAN_VALUE
A boolean value (false, true)
INTEGER_VALUE
An integer value
REAL_VALUE
A real value
RELATIVE_TIME_VALUE
A relative time value
ABSOLUTE_TIME_VALUE
An absolute time value
STRING_VALUE
A string value
CLASSAD_VALUE
A classad value
LIST_VALUE
An expression list value

Public Fields

static const double ScaleFactor[]
Values of number multiplication factors

Public Methods

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
inline ValueType GetType()
Gets the type of the value
bool IsAbsoluteTimeValue( )
Checks if the value is an absolute time value
bool IsAbsoluteTimeValue( time_t& secs )
Checks if the value is an absolute time value
inline bool IsBooleanValue(bool& b)
Checks if the value is boolean
inline bool IsBooleanValue()
Checks if the value is boolean
inline bool IsClassAdValue(ClassAd *&c)
Checks if the value is a ClassAd
inline bool IsClassAdValue()
Checks if the value is a ClassAd
inline bool IsErrorValue()
Checks if the value is the error value
inline bool IsExceptional()
Checks if the value is exceptional
inline bool IsIntegerValue()
Checks if the value is integral
inline bool IsIntegerValue(int &i)
Checks if the value is integral
inline bool IsListValue(const ExprList*& l)
Checks if the value is an expression list
inline bool IsListValue()
Checks if the value is an expression list
bool IsNumber()
Checks if the value is numerical
bool IsNumber(int &i)
Checks if the value is numerical
bool IsNumber(double &r)
Checks if the value is numerical
inline bool IsRealValue()
Checks if the value is real
inline bool IsRealValue(double &r)
Checks if the value is real
bool IsRelativeTimeValue( time_t& secs )
Checks if the value is a relative time value
bool IsRelativeTimeValue( )
Checks if the value is a relative time value
bool IsStringValue( const char *&str )
Checks if the value is a string
bool IsStringValue( string &str )
Checks if the value is a string
inline bool IsStringValue()
Checks if the value is a string
bool IsStringValue( char *str, int len )
Checks if the value is a string
inline bool IsUndefinedValue()
Checks if the value is the undefined value
void SetAbsoluteTimeValue( time_t secs )
Sets an absolute time value in seconds since the UNIX epoch
void SetBooleanValue(bool b)
Sets a boolean value; previous value discarded
void SetClassAdValue(ClassAd* c)
Sets a ClassAd value; previous value discarded
void SetErrorValue(void)
Sets the error value; previous value discarded
void SetIntegerValue(int i)
Sets an integer value; previous value discarded
void SetListValue(const ExprList* l)
Sets an expression list value; previous value discarded
void SetRealValue(double r)
Sets a real value; previous value discarded
void SetRelativeTimeValue( time_t secs )
Sets a relative time value
void SetStringValue( const string &str )
Sets a string value; previous value discarded
void SetStringValue( const char *str )
Sets a string value; previous value discarded
void SetUndefinedValue(void)
Sets the undefined value; previous value discarded
Value()
Constructor
~Value()
Destructor

Public

enum NumberFactor
Number factors
NO_FACTOR
No factor specified
B_FACTOR
Byte factor
K_FACTOR
Kilo factor
M_FACTOR
Mega factor
G_FACTOR
Giga factor
T_FACTOR
Terra factor
enum ValueType
Value types
ERROR_VALUE
The error value
UNDEFINED_VALUE
The undefined value
BOOLEAN_VALUE
A boolean value (false, true)
INTEGER_VALUE
An integer value
REAL_VALUE
A real value
RELATIVE_TIME_VALUE
A relative time value
ABSOLUTE_TIME_VALUE
An absolute time value
STRING_VALUE
A string value
CLASSAD_VALUE
A classad value
LIST_VALUE
An expression list value

Documentation

Represents the result of an evaluation.
void CopyFrom( const Value &v )
Copies the value of another value object
Parameters:
v - The value copied from.

void SetBooleanValue(bool b)
Sets a boolean value; previous value discarded
Parameters:
b - The boolean value.

void SetRealValue(double r)
Sets a real value; previous value discarded
Parameters:
r - The real value.

void SetIntegerValue(int i)
Sets an integer value; previous value discarded
Parameters:
i - The integer value.

void SetListValue(const ExprList* l)
Sets an expression list value; previous value discarded
Parameters:
l - The list value.

void SetClassAdValue(ClassAd* c)
Sets a ClassAd value; previous value discarded
Parameters:
c - The ClassAd value.

void SetStringValue( const string &str )
Sets a string value; previous value discarded
Parameters:
str - The string value.

void SetStringValue( const char *str )
Sets a string value; previous value discarded
Parameters:
str - The string value.

void SetAbsoluteTimeValue( time_t secs )
Sets an absolute time value in seconds since the UNIX epoch
Parameters:
secs - Number of seconds since the UNIX epoch.

void SetRelativeTimeValue( time_t secs )
Sets a relative time value
Parameters:
secs - Number of seconds.

inline ValueType GetType()
Gets the type of the value
Returns:
The value type.
See Also:
ValueType

inline bool IsBooleanValue(bool& b)
Checks if the value is boolean
Returns:
true iff the value is boolean.
Parameters:
b - The boolean value if the value is boolean.

inline bool IsBooleanValue()
Checks if the value is boolean
Returns:
true iff the value is boolean.

inline bool IsIntegerValue(int &i)
Checks if the value is integral
Returns:
true iff the value is an integer.
Parameters:
i - The integer value if the value is integer.

inline bool IsIntegerValue()
Checks if the value is integral
Returns:
true iff the value is an integer.

inline bool IsRealValue(double &r)
Checks if the value is real
Returns:
true iff the value is real.
Parameters:
r - The real value if the value is real.

inline bool IsRealValue()
Checks if the value is real
Returns:
true iff the value is real.

bool IsStringValue( string &str )
Checks if the value is a string.
Returns:
true iff the value is a string.
Parameters:
str - A reference to a string object, which is filled with the string value.

bool IsStringValue( const char *&str )
Checks if the value is a string.
Returns:
true iff the value is a string.
Parameters:
str - A reference to a C string, which will point to the string value. This pointer must not be deallocated or tampered with.

bool IsStringValue( char *str, int len )
Checks if the value is a string.
Returns:
true iff the value is a string.
Parameters:
str - A buffer to hold the string value.
len - The size of the buffer.

inline bool IsStringValue()
Checks if the value is a string
Returns:
true iff the value is string.

inline bool IsListValue(const ExprList*& l)
Checks if the value is an expression list
Returns:
true iff the value is an expression list.
Parameters:
l - The expression list if the value is an expression list.

inline bool IsListValue()
Checks if the value is an expression list
Returns:
true iff the value is an expression list.

inline bool IsClassAdValue(ClassAd *&c)
Checks if the value is a ClassAd
Returns:
true iff the value is a ClassAd.
Parameters:
c - The ClassAd if the value is a ClassAd.

inline bool IsClassAdValue()
Checks if the value is a ClassAd
Returns:
true iff the value is a ClassAd value.

inline bool IsUndefinedValue()
Checks if the value is the undefined value
Returns:
true iff the value if the undefined value.

inline bool IsErrorValue()
Checks if the value is the error value
Returns:
true iff the value if the error value.

inline bool IsExceptional()
Checks if the value is exceptional
Returns:
true iff the value is either undefined or error.

bool IsNumber()
Checks if the value is numerical.
Returns:
true iff the value is a number

bool IsNumber(int &i)
Checks if the value is numerical. If the value is a real, it is converted to an integer through truncation.
Returns:
true iff the value is a number
Parameters:
i - The integer value of the value if the value is a number.

bool IsNumber(double &r)
Checks if the value is numerical. If the value is an integer, it is promoted to a real.
Returns:
true iff the value is a number
Parameters:
r - The real value of the value if the value is a number.

bool IsAbsoluteTimeValue( )
Checks if the value is an absolute time value
Returns:
true iff the value is an absolute time value.

bool IsAbsoluteTimeValue( time_t& secs )
Checks if the value is an absolute time value
Returns:
true iff the value is an absolute time value.
Parameters:
secs - Number of seconds since the UNIX epoch.

bool IsRelativeTimeValue( )
Checks if the value is a relative time value
Returns:
true iff the value is a relative time value

bool IsRelativeTimeValue( time_t& secs )
Checks if the value is a relative time value
Returns:
true iff the value is a relative time value
Parameters:
secs - Number of seconds


This class has no child classes.

alphabetic index hierarchy of classes


Condor Home Page

generated by doc++