In file literals.h:

class Literal : public ExprTree

Represents the literals of the ClassAd language, such as integers, reals, booleans, strings, undefined and real

Inheritance:

Literal < ExprTree


Public Methods

virtual Literal* Copy( )
Make a deep copy
void GetComponents( Value& v, Value::NumberFactor &f )
Deconstructor to get the components of the literal
void GetValue( Value& v )
Deconstructor to get the encapsulated value
static Literal* MakeAbsTime( time_t now=-1 )
Create an absolute time literal
static Literal* MakeLiteral( const Value& v, Value::NumberFactor f= Value::NO_FACTOR )
Factory method to construct a Literal
static Literal* MakeRelTime( time_t secs=-1 )
Create a relative time literal
static Literal* MakeRelTime( time_t t1, time_t t2 )
Create a relative time interval by subtracting two absolute times
~Literal()
Destructor

Protected Methods

Literal()
Constructor

Inherited from ExprTree:

Public Classes

enum NodeKind
LITERAL_NODE
Literal node (string, integer, real, boolean, undefined, error)
ATTRREF_NODE
Attribute reference node (attr, .attr, expr.attr)
OP_NODE
Expression operation node (unary, binary, ternary)/
FN_CALL_NODE
Function call node
CLASSAD_NODE
ClassAd node
EXPR_LIST_NODE
Expression list node

Public Methods

NodeKind GetKind(void)
const ClassAd* GetParentScope( )
void Puke( )
void SetParentScope( const ClassAd* p )

Public

enum NodeKind
LITERAL_NODE
Literal node (string, integer, real, boolean, undefined, error)
ATTRREF_NODE
Attribute reference node (attr, .attr, expr.attr)
OP_NODE
Expression operation node (unary, binary, ternary)/
FN_CALL_NODE
Function call node
CLASSAD_NODE
ClassAd node
EXPR_LIST_NODE
Expression list node

Documentation

Represents the literals of the ClassAd language, such as integers, reals, booleans, strings, undefined and real
static Literal* MakeAbsTime( time_t now=-1 )
Create an absolute time literal
Returns:
The literal expression.
Parameters:
now - The time in UNIX epoch. If a value of -1 is passed in the system's current time will be used.

static Literal* MakeRelTime( time_t secs=-1 )
Create a relative time literal
Returns:
The literal expression.
Parameters:
secs - The number of seconds. If a value of -1 is passed in the time since midnight (i.e., the daytime) is used.

static Literal* MakeRelTime( time_t t1, time_t t2 )
Create a relative time interval by subtracting two absolute times
Returns:
The literal expression of the relative time (t1 - t2).
Parameters:
t1 - The end time of the interval. If -1 is passed in, the system's current time will be used.
t2 - the start time of the interval If -1 is passed in, the system's current time will be used.

static Literal* MakeLiteral( const Value& v, Value::NumberFactor f= Value::NO_FACTOR )
Factory method to construct a Literal
Returns:
The constructed literal expression
Parameters:
v - The value to convert to a literal. (Cannot be a classad or list value.)
f - The number factor (B, K, M, G, T) --- ignored for non-numeric values.

void GetComponents( Value& v, Value::NumberFactor &f )
Deconstructor to get the components of the literal
Parameters:
v - The encapsulated value
f - The number factor (invalid if v is non-numeric)

void GetValue( Value& v )
Deconstructor to get the encapsulated value
Parameters:
v - The value encapsulated by the literal


This class has no child classes.

alphabetic index hierarchy of classes


Condor Home Page

generated by doc++