An internal node of an expression which represents a ClassAd.
An internal node of an expression which represents a ClassAd.
void GetComponents( vector< pair< string, ExprTree *> > &vec )
Insertion Methods
bool Insert( const string &attrName, ExprTree *expr )
expr - The expression bound to the name.
bool DeepInsert( ExprTree *scopeExpr, const string &attrName, ExprTree *expr )
attrName - The name of the attribute.
expr - The expression bound to the name.
bool InsertAttr( const string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR )
value - The integer value of the attribute.
f - The multiplicative factor to be attached to value.
bool DeepInsertAttr( ExprTree *scopeExpr, const string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR )
attrName - The name of the attribute.
value - The integer value of the attribute.
f - The multiplicative factor to be attached to value.
bool InsertAttr( const string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR)
value - The real value of the attribute.
f - The multiplicative factor to be attached to value.
bool DeepInsertAttr( ExprTree *scopeExpr, const string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR)
attrName - The name of the attribute.
value - The string attribute
dup - If dup is true, the value is duplicated internally.
Otherwise, the string is assumed to have been created with new[]
and the classad assumes responsibility for freeing the storage. bool InsertAttr( const string &attrName, bool value )
value - The boolean value of the attribute. bool DeepInsertAttr( ExprTree *scopeExpr, const string &attrName, bool value )
attrName - The name of the attribute. This string is
always duplicated internally.
value - The string attribute
dup - If dup is true, the value is duplicated internally.
Otherwise, the string is assumed to have been created with new[]
and the classad assumes responsibility for freeing the storage. bool InsertAttr( const string &attrName, const string &value )
value - The string attribute bool DeepInsertAttr( ExprTree *scopeExpr, const string &attrName, const string &value )
attrName - The name of the attribute.
value - The string attribute
dup - If dup is true, the value is duplicated internally.
Otherwise, the string is assumed to have been created with new[]
and the classad assumes responsibility for freeing the storage. Lookup Methods
ExprTree* Lookup( const string &attrName )
ExprTree* LookupInScope(const string &attrName, const ClassAd *&ad)
ad - The closest enclosing scope of the returned expression,
or NULL if no expression was found.
Attribute Deletion Methods
bool Delete( const string &attrName )
bool DeepDelete( const string &scopeExpr, const string &attrName )
attrName - The name of the attribute to be delete.
bool DeepDelete( ExprTree *scopeExpr, const string &attrName )
attrName - The name of the attribute to be delete.
ExprTree* Remove( const string &attrName )
ExprTree* DeepRemove( const string &scopeExpr, const string &attrName )
attrName - The name of the attribute to be extricated.
ExprTree* DeepRemove( ExprTree *scopeExpr, const string &attrName )
attrName - The name of the attribute to be extricated.
Evaluation Methods
bool EvaluateAttr( const string& attrName, Value &result )
result - The result of the evaluation. bool EvaluateExpr( const string& buf, Value &result )
result - The result of the evaluation.
bool EvaluateExpr( ExprTree* expr, Value &result )
result - The result of the evaluation. bool EvaluateExpr( ExprTree* expr, Value &result, ExprTree *&sig)
result - The result of the evaluation.
sig - The significant subexpressions of the evaluation. bool EvaluateAttrInt( const string &attrName, int& intValue )
intValue - The value of the attribute.
bool EvaluateAttrReal( const string &attrName, double& realValue )
realValue - The value of the attribute.
bool EvaluateAttrNumber( const string &attrName, int& intValue )
intValue - The value of the attribute.
bool EvaluateAttrNumber(const string &attrName, double& realValue)
realValue - The value of the attribute.
bool EvaluateAttrString( const string &attrName, char *buf, int len)
buf - The buffer for the string value.
len - Size of buffer
bool EvaluateAttrString( const string &attrName, string &buf )
buf - The buffer for the string value.
bool EvaluateAttrBool( const string &attrName, bool& boolValue )
boolValue - The value of the attribute.
Miscellaneous
bool Flatten( const ExprTree* expr, Value& val, ExprTree *&fexpr )
val - The value after flattening, if the expression was
completely flattened. This value is valid if and only if
fexpr is NULL.
fexpr - The flattened expression tree if the expression did
not flatten to a single value, and NULL otherwise.
generated by doc++