The ClassAd object represents a parsed ClassAd. More...
#include <classad.h>
Public Member Functions | |
bool | GetInternalReferences (const ExprTree *tree, References &refs, bool fullNames) |
bool | GetInternalReferences (const ExprTree *tree, References &refs, bool fullNames) |
Constructors/Destructor | |
ClassAd () | |
Default constructor. | |
ClassAd (const ClassAd &ad) | |
virtual | ~ClassAd () |
Destructor. | |
ClassAd () | |
Default constructor. | |
ClassAd (const ClassAd &ad) | |
virtual | ~ClassAd () |
Destructor. | |
Insertion Methods | |
bool | Insert (const std::string &attrName, ExprTree *expr) |
bool | DeepInsert (ExprTree *scopeExpr, const std::string &attrName, ExprTree *expr) |
bool | InsertAttr (const std::string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | InsertAttr (const std::string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | InsertAttr (const std::string &attrName, bool value) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, bool value) |
bool | InsertAttr (const std::string &attrName, const char *value) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, const char *value) |
bool | InsertAttr (const std::string &attrName, const std::string &value) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, const std::string &value) |
bool | Insert (const std::string &attrName, ExprTree *expr) |
bool | DeepInsert (ExprTree *scopeExpr, const std::string &attrName, ExprTree *expr) |
bool | InsertAttr (const std::string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | InsertAttr (const std::string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR) |
bool | InsertAttr (const std::string &attrName, bool value) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, bool value) |
bool | InsertAttr (const std::string &attrName, const char *value) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, const char *value) |
bool | InsertAttr (const std::string &attrName, const std::string &value) |
bool | DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, const std::string &value) |
Lookup Methods | |
ExprTree * | Lookup (const std::string &attrName) const |
ExprTree * | LookupInScope (const std::string &attrName, const ClassAd *&ad) const |
ExprTree * | Lookup (const std::string &attrName) const |
ExprTree * | LookupInScope (const std::string &attrName, const ClassAd *&ad) const |
Attribute Deletion Methods | |
void | Clear () |
bool | Delete (const std::string &attrName) |
bool | DeepDelete (const std::string &scopeExpr, const std::string &attrName) |
bool | DeepDelete (ExprTree *scopeExpr, const std::string &attrName) |
ExprTree * | Remove (const std::string &attrName) |
ExprTree * | DeepRemove (const std::string &scopeExpr, const std::string &attrName) |
ExprTree * | DeepRemove (ExprTree *scopeExpr, const std::string &attrName) |
void | Clear () |
bool | Delete (const std::string &attrName) |
bool | DeepDelete (const std::string &scopeExpr, const std::string &attrName) |
bool | DeepDelete (ExprTree *scopeExpr, const std::string &attrName) |
ExprTree * | Remove (const std::string &attrName) |
ExprTree * | DeepRemove (const std::string &scopeExpr, const std::string &attrName) |
ExprTree * | DeepRemove (ExprTree *scopeExpr, const std::string &attrName) |
Evaluation Methods | |
bool | EvaluateAttr (const std::string &attrName, Value &result) const |
bool | EvaluateExpr (const std::string &buf, Value &result) const |
bool | EvaluateExpr (const ExprTree *expr, Value &result) const |
bool | EvaluateExpr (const ExprTree *expr, Value &result, ExprTree *&sig) const |
bool | EvaluateAttrInt (const std::string &attr, int &intValue) const |
bool | EvaluateAttrReal (const std::string &attr, double &realValue) const |
bool | EvaluateAttrNumber (const std::string &attr, int &intValue) const |
bool | EvaluateAttrNumber (const std::string &attr, double &realValue) const |
bool | EvaluateAttrString (const std::string &attr, char *buf, int len) const |
bool | EvaluateAttrString (const std::string &attr, std::string &buf) const |
bool | EvaluateAttrBool (const std::string &attr, bool &boolValue) const |
bool | EvaluateAttrClassAd (const std::string &attr, ClassAd *&classad) const |
bool | EvaluateAttrList (const std::string &attr, ExprList *&l) const |
bool | EvaluateAttr (const std::string &attrName, Value &result) const |
bool | EvaluateExpr (const std::string &buf, Value &result) const |
bool | EvaluateExpr (const ExprTree *expr, Value &result) const |
bool | EvaluateExpr (const ExprTree *expr, Value &result, ExprTree *&sig) const |
bool | EvaluateAttrInt (const std::string &attr, int &intValue) const |
bool | EvaluateAttrReal (const std::string &attr, double &realValue) const |
bool | EvaluateAttrNumber (const std::string &attr, int &intValue) const |
bool | EvaluateAttrNumber (const std::string &attr, double &realValue) const |
bool | EvaluateAttrString (const std::string &attr, char *buf, int len) const |
bool | EvaluateAttrString (const std::string &attr, std::string &buf) const |
bool | EvaluateAttrBool (const std::string &attr, bool &boolValue) const |
bool | EvaluateAttrClassAd (const std::string &attr, ClassAd *&classad) const |
bool | EvaluateAttrList (const std::string &attr, ExprList *&l) const |
Chaining functions | |
void | ChainToAd (ClassAd *new_chain_parent_ad) |
void | Unchain (void) |
ClassAd * | GetChainedParentAd (void) |
bool | CopyFromChain (const ClassAd &ad) |
bool | UpdateFromChain (const ClassAd &ad) |
void | ChainToAd (ClassAd *new_chain_parent_ad) |
void | Unchain (void) |
ClassAd * | GetChainedParentAd (void) |
bool | CopyFromChain (const ClassAd &ad) |
bool | UpdateFromChain (const ClassAd &ad) |
Public Attributes | |
ClassAd * | alternateScope |
Friends | |
class | AttributeReference |
class | ExprTree |
class | EvalState |
class | ClassAdIterator |
STL-like Iterators | |
| |
typedef AttrList::iterator | iterator |
typedef AttrList::const_iterator | const_iterator |
typedef AttrList::iterator | iterator |
typedef AttrList::const_iterator | const_iterator |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
iterator | find (std::string const &attrName) |
const_iterator | find (std::string const &attrName) const |
int | size (void) const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
iterator | find (std::string const &attrName) |
const_iterator | find (std::string const &attrName) const |
int | size (void) const |
Dirty Tracking | |
| |
typedef DirtyAttrList::iterator | dirtyIterator |
typedef DirtyAttrList::iterator | dirtyIterator |
void | EnableDirtyTracking (void) |
void | DisableDirtyTracking (void) |
void | ClearAllDirtyFlags (void) |
void | MarkAttributeDirty (const std::string &name) |
void | MarkAttributeClean (const std::string &name) |
bool | IsAttributeDirty (const std::string &name) |
dirtyIterator | dirtyBegin () |
dirtyIterator | dirtyEnd () |
void | EnableDirtyTracking (void) |
void | DisableDirtyTracking (void) |
void | ClearAllDirtyFlags (void) |
void | MarkAttributeDirty (const std::string &name) |
void | MarkAttributeClean (const std::string &name) |
bool | IsAttributeDirty (const std::string &name) |
dirtyIterator | dirtyBegin () |
dirtyIterator | dirtyEnd () |
Miscellaneous | |
| |
bool | operator== (ClassAd &list1, ClassAd &list2) |
bool | operator== (ClassAd &list1, ClassAd &list2) |
void | GetComponents (std::vector< std::pair< std::string, ExprTree * > > &vec) const |
bool | Update (const ClassAd &ad) |
void | Modify (ClassAd &ad) |
virtual ExprTree * | Copy () const |
ClassAd & | operator= (const ClassAd &rhs) |
bool | CopyFrom (const ClassAd &ad) |
virtual bool | SameAs (const ExprTree *tree) const |
bool | Flatten (const ExprTree *expr, Value &val, ExprTree *&fexpr) const |
bool | FlattenAndInline (const ExprTree *expr, Value &val, ExprTree *&fexpr) const |
bool | GetExternalReferences (const ExprTree *tree, References &refs, bool fullNames) |
bool | GetExternalReferences (const ExprTree *tree, PortReferences &refs) |
void | GetComponents (std::vector< std::pair< std::string, ExprTree * > > &vec) const |
bool | Update (const ClassAd &ad) |
void | Modify (ClassAd &ad) |
virtual ExprTree * | Copy () const |
ClassAd & | operator= (const ClassAd &rhs) |
bool | CopyFrom (const ClassAd &ad) |
virtual bool | SameAs (const ExprTree *tree) const |
bool | Flatten (const ExprTree *expr, Value &val, ExprTree *&fexpr) const |
bool | FlattenAndInline (const ExprTree *expr, Value &val, ExprTree *&fexpr) const |
bool | GetExternalReferences (const ExprTree *tree, References &refs, bool fullNames) |
bool | GetExternalReferences (const ExprTree *tree, PortReferences &refs) |
static ClassAd * | MakeClassAd (std::vector< std::pair< std::string, ExprTree * > > &vec) |
static ClassAd * | MakeClassAd (std::vector< std::pair< std::string, ExprTree * > > &vec) |
The ClassAd object represents a parsed ClassAd.
typedef AttrList::const_iterator ClassAd::const_iterator |
Define a constatnt iterator we can use on a ClassAd
typedef AttrList::const_iterator ClassAd::const_iterator |
Define a constatnt iterator we can use on a ClassAd
typedef AttrList::iterator ClassAd::iterator |
Define an iterator we can use on a ClassAd
typedef AttrList::iterator ClassAd::iterator |
Define an iterator we can use on a ClassAd
iterator ClassAd::begin | ( | ) | [inline] |
Returns an iterator pointing to the beginning of the attribute/value pairs in the ClassAd
const_iterator ClassAd::begin | ( | ) | const [inline] |
Returns a constant iterator pointing to the beginning of the attribute/value pairs in the ClassAd
iterator ClassAd::begin | ( | ) | [inline] |
Returns an iterator pointing to the beginning of the attribute/value pairs in the ClassAd
const_iterator ClassAd::begin | ( | ) | const [inline] |
Returns a constant iterator pointing to the beginning of the attribute/value pairs in the ClassAd
void ClassAd::ChainToAd | ( | ClassAd * | new_chain_parent_ad | ) |
Chain this ad to the parent ad. After chaining, any attribute we look for that is not in this ad will be looked for in the parent ad. This is a simple form of compression: many ads can be linked to a parent ad that contains common attributes between the ads. If an attribute is in both this ad and the parent, a lookup will only show it in the parent. If we make any modifications to this ad, it will not affect the parent.
new_chain_parent_ad | the parent ad we are chained too. |
void ClassAd::ChainToAd | ( | ClassAd * | new_chain_parent_ad | ) |
Chain this ad to the parent ad. After chaining, any attribute we look for that is not in this ad will be looked for in the parent ad. This is a simple form of compression: many ads can be linked to a parent ad that contains common attributes between the ads. If an attribute is in both this ad and the parent, a lookup will only show it in the parent. If we make any modifications to this ad, it will not affect the parent.
new_chain_parent_ad | the parent ad we are chained too. |
void ClassAd::Clear | ( | ) |
Clears the ClassAd of all attributes.
void ClassAd::Clear | ( | ) |
Clears the ClassAd of all attributes.
void ClassAd::ClearAllDirtyFlags | ( | void | ) |
Mark all attributes in the ClassAd as not dirty
void ClassAd::ClearAllDirtyFlags | ( | void | ) |
Mark all attributes in the ClassAd as not dirty
ExprTree * ClassAd::Copy | ( | ) | const [virtual] |
virtual ExprTree* ClassAd::Copy | ( | ) | const [virtual] |
bool ClassAd::CopyFrom | ( | const ClassAd & | ad | ) |
bool ClassAd::CopyFrom | ( | const ClassAd & | ad | ) |
bool ClassAd::CopyFromChain | ( | const ClassAd & | ad | ) |
bool ClassAd::CopyFromChain | ( | const ClassAd & | ad | ) |
bool ClassAd::DeepDelete | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName | |||
) |
Deletes the named attribute from a nested classAd. The scope expression is evaluated to obtain a nested classad, and the attribute is then deleted from this ad. Only attributes from the local ClassAd are considered; scoping information is ignored. The expression bound to the attribute is deleted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute to be delete. |
bool ClassAd::DeepDelete | ( | const std::string & | scopeExpr, | |
const std::string & | attrName | |||
) |
Deletes the named attribute from a nested classAd. The scope expression is evaluated to obtain a nested classad, and the attribute is then deleted from this ad. Only attributes from the local ClassAd are considered; scoping information is ignored. The expression bound to the attribute is deleted.
scopeExpr | String representation of the scope expression. | |
attrName | The name of the attribute to be delete. |
bool ClassAd::DeepDelete | ( | const std::string & | scopeExpr, | |
const std::string & | attrName | |||
) |
Deletes the named attribute from a nested classAd. The scope expression is evaluated to obtain a nested classad, and the attribute is then deleted from this ad. Only attributes from the local ClassAd are considered; scoping information is ignored. The expression bound to the attribute is deleted.
scopeExpr | String representation of the scope expression. | |
attrName | The name of the attribute to be delete. |
bool ClassAd::DeepDelete | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName | |||
) |
Deletes the named attribute from a nested classAd. The scope expression is evaluated to obtain a nested classad, and the attribute is then deleted from this ad. Only attributes from the local ClassAd are considered; scoping information is ignored. The expression bound to the attribute is deleted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute to be delete. |
Inserts an attribute into a nested classAd. The scope expression is evaluated to obtain a nested classad, and the attribute is inserted into this subclassad. The setParentScope() method is invoked on the inserted expression.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
expr | The expression bound to the name. |
Inserts an attribute into a nested classAd. The scope expression is evaluated to obtain a nested classad, and the attribute is inserted into this subclassad. The setParentScope() method is invoked on the inserted expression.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
expr | The expression bound to the name. |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
bool | value | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The boolean value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. This string is always duplicated internally. | |
value | The string attribute |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
int | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the attribute is inserted into this subclassad. The integer value is converted into a Literal expression, and then inserted into the nested classad.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
value | The integer value of the attribute. | |
f | The multiplicative factor to be attached to value. |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
int | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the attribute is inserted into this subclassad. The integer value is converted into a Literal expression, and then inserted into the nested classad.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
value | The integer value of the attribute. | |
f | The multiplicative factor to be attached to value. |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
double | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The double value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | String representation of the scope expression. | |
attrName | The name of the attribute. | |
value | The string attribute | |
f | A multipler for the number. |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
bool | value | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The boolean value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. This string is always duplicated internally. | |
value | The string attribute |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
const char * | value | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The string value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
value | The string attribute |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
const std::string & | value | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The string value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
value | The string attribute |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
const char * | value | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The string value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
value | The string attribute |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
const std::string & | value | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The string value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | The scope expression. | |
attrName | The name of the attribute. | |
value | The string attribute |
bool ClassAd::DeepInsertAttr | ( | ExprTree * | scopeExpr, | |
const std::string & | attrName, | |||
double | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into a nested classad. The scope expression is evaluated to obtain a nested classad, and the insertion is made in the nested classad. The double value is converted into a Literal expression to yield the expression to be inserted.
scopeExpr | String representation of the scope expression. | |
attrName | The name of the attribute. | |
value | The string attribute | |
f | A multipler for the number. |
ExprTree* ClassAd::DeepRemove | ( | const std::string & | scopeExpr, | |
const std::string & | attrName | |||
) |
Similar to DeepDelete, but the expression is returned rather than deleted from the classad.
scopeExpr | String representation of the scope expression | |
attrName | The name of the attribute to be extricated. |
Similar to DeepDelete, but the expression is returned rather than deleted from the classad.
scopeExpr | The scope expression | |
attrName | The name of the attribute to be extricated. |
ExprTree* ClassAd::DeepRemove | ( | const std::string & | scopeExpr, | |
const std::string & | attrName | |||
) |
Similar to DeepDelete, but the expression is returned rather than deleted from the classad.
scopeExpr | String representation of the scope expression | |
attrName | The name of the attribute to be extricated. |
Similar to DeepDelete, but the expression is returned rather than deleted from the classad.
scopeExpr | The scope expression | |
attrName | The name of the attribute to be extricated. |
bool ClassAd::Delete | ( | const std::string & | attrName | ) |
Deletes the named attribute from the ClassAd. Only attributes from the local ClassAd are considered; scoping information is ignored. The expression bound to the attribute is deleted.
attrName | The name of the attribute to be delete. |
bool ClassAd::Delete | ( | const std::string & | attrName | ) |
Deletes the named attribute from the ClassAd. Only attributes from the local ClassAd are considered; scoping information is ignored. The expression bound to the attribute is deleted.
attrName | The name of the attribute to be delete. |
dirtyIterator ClassAd::dirtyBegin | ( | ) | [inline] |
Return an interator to the first dirty attribute so all dirty attributes can be iterated through.
dirtyIterator ClassAd::dirtyBegin | ( | ) | [inline] |
Return an interator to the first dirty attribute so all dirty attributes can be iterated through.
dirtyIterator ClassAd::dirtyEnd | ( | ) | [inline] |
Return an iterator past the last dirty attribute
dirtyIterator ClassAd::dirtyEnd | ( | ) | [inline] |
Return an iterator past the last dirty attribute
void ClassAd::DisableDirtyTracking | ( | void | ) | [inline] |
Turn off ditry tracking for this ClassAd.
void ClassAd::DisableDirtyTracking | ( | void | ) | [inline] |
Turn off ditry tracking for this ClassAd.
void ClassAd::EnableDirtyTracking | ( | void | ) | [inline] |
Turn on dirty tracking for this ClassAd. If tracking is on, every insert will label the attribute that was inserted as dirty. Dirty tracking is always turned off during Copy() and CopyFrom().
void ClassAd::EnableDirtyTracking | ( | void | ) | [inline] |
Turn on dirty tracking for this ClassAd. If tracking is on, every insert will label the attribute that was inserted as dirty. Dirty tracking is always turned off during Copy() and CopyFrom().
iterator ClassAd::end | ( | ) | [inline] |
Returns aniterator pointing past the end of the attribute/value pairs in the ClassAd
const_iterator ClassAd::end | ( | ) | const [inline] |
Returns a constant iterator pointing past the end of the attribute/value pairs in the ClassAd
iterator ClassAd::end | ( | ) | [inline] |
Returns aniterator pointing past the end of the attribute/value pairs in the ClassAd
const_iterator ClassAd::end | ( | ) | const [inline] |
Returns a constant iterator pointing past the end of the attribute/value pairs in the ClassAd
bool ClassAd::EvaluateAttr | ( | const std::string & | attrName, | |
Value & | result | |||
) | const |
Evaluates expression bound to an attribute.
attrName | The name of the attribute in the ClassAd. | |
result | The result of the evaluation. |
bool ClassAd::EvaluateAttr | ( | const std::string & | attrName, | |
Value & | result | |||
) | const |
Evaluates expression bound to an attribute.
attrName | The name of the attribute in the ClassAd. | |
result | The result of the evaluation. |
bool ClassAd::EvaluateAttrBool | ( | const std::string & | attr, | |
bool & | boolValue | |||
) | const |
Evaluates an attribute to a boolean. A pointer to the string is returned.
attr | The name of the attribute. | |
boolValue | The value of the attribute. |
bool ClassAd::EvaluateAttrBool | ( | const std::string & | attr, | |
bool & | boolValue | |||
) | const |
Evaluates an attribute to a boolean. A pointer to the string is returned.
attr | The name of the attribute. | |
boolValue | The value of the attribute. |
bool ClassAd::EvaluateAttrClassAd | ( | const std::string & | attr, | |
ClassAd *& | classad | |||
) | const |
bool ClassAd::EvaluateAttrClassAd | ( | const std::string & | attr, | |
ClassAd *& | classad | |||
) | const |
bool ClassAd::EvaluateAttrInt | ( | const std::string & | attr, | |
int & | intValue | |||
) | const |
Evaluates an attribute to an integer.
attr | The name of the attribute. | |
intValue | The value of the attribute. |
bool ClassAd::EvaluateAttrInt | ( | const std::string & | attr, | |
int & | intValue | |||
) | const |
Evaluates an attribute to an integer.
attr | The name of the attribute. | |
intValue | The value of the attribute. |
bool ClassAd::EvaluateAttrList | ( | const std::string & | attr, | |
ExprList *& | l | |||
) | const |
bool ClassAd::EvaluateAttrList | ( | const std::string & | attr, | |
ExprList *& | l | |||
) | const |
bool ClassAd::EvaluateAttrNumber | ( | const std::string & | attr, | |
int & | intValue | |||
) | const |
Evaluates an attribute to an integer. If the attribute evaluated to a real, it is truncated to an integer.
attr | The name of the attribute. | |
intValue | The value of the attribute. |
bool ClassAd::EvaluateAttrNumber | ( | const std::string & | attr, | |
double & | realValue | |||
) | const |
Evaluates an attribute to a real. If the attribute evaluated to an integer, it is promoted to a real.
attr | The name of the attribute. | |
realValue | The value of the attribute. |
bool ClassAd::EvaluateAttrNumber | ( | const std::string & | attr, | |
int & | intValue | |||
) | const |
Evaluates an attribute to an integer. If the attribute evaluated to a real, it is truncated to an integer.
attr | The name of the attribute. | |
intValue | The value of the attribute. |
bool ClassAd::EvaluateAttrNumber | ( | const std::string & | attr, | |
double & | realValue | |||
) | const |
Evaluates an attribute to a real. If the attribute evaluated to an integer, it is promoted to a real.
attr | The name of the attribute. | |
realValue | The value of the attribute. |
bool ClassAd::EvaluateAttrReal | ( | const std::string & | attr, | |
double & | realValue | |||
) | const |
Evaluates an attribute to a real.
attr | The name of the attribute. | |
realValue | The value of the attribute. |
bool ClassAd::EvaluateAttrReal | ( | const std::string & | attr, | |
double & | realValue | |||
) | const |
Evaluates an attribute to a real.
attr | The name of the attribute. | |
realValue | The value of the attribute. |
bool ClassAd::EvaluateAttrString | ( | const std::string & | attr, | |
std::string & | buf | |||
) | const |
Evaluates an attribute to a string. If the string value does not fit into the buffer, only the portion that does fit is copied over.
attr | The name of the attribute. | |
buf | The buffer for the string value. |
bool ClassAd::EvaluateAttrString | ( | const std::string & | attr, | |
char * | buf, | |||
int | len | |||
) | const |
Evaluates an attribute to a string. If the string value does not fit into the buffer, only the portion that does fit is copied over.
attr | The name of the attribute. | |
buf | The buffer for the string value. | |
len | Size of buffer |
bool ClassAd::EvaluateAttrString | ( | const std::string & | attr, | |
std::string & | buf | |||
) | const |
Evaluates an attribute to a string. If the string value does not fit into the buffer, only the portion that does fit is copied over.
attr | The name of the attribute. | |
buf | The buffer for the string value. |
bool ClassAd::EvaluateAttrString | ( | const std::string & | attr, | |
char * | buf, | |||
int | len | |||
) | const |
Evaluates an attribute to a string. If the string value does not fit into the buffer, only the portion that does fit is copied over.
attr | The name of the attribute. | |
buf | The buffer for the string value. | |
len | Size of buffer |
Evaluates an expression. If the expression doesn't already live in this ClassAd, the setParentScope() method must be called on it first.
expr | The expression to be evaluated. | |
result | The result of the evaluation. |
bool ClassAd::EvaluateExpr | ( | const std::string & | buf, | |
Value & | result | |||
) | const |
Evaluates an expression.
buf | Buffer containing the external representation of the expression. This buffer is parsed to yield the expression to be evaluated. | |
result | The result of the evaluation. |
Evaluates an expression, and returns the significant subexpressions encountered during the evaluation. If the expression doesn't already live in this ClassAd, call the setParentScope() method on it first.
expr | The expression to be evaluated. | |
result | The result of the evaluation. | |
sig | The significant subexpressions of the evaluation. |
bool ClassAd::EvaluateExpr | ( | const std::string & | buf, | |
Value & | result | |||
) | const |
Evaluates an expression.
buf | Buffer containing the external representation of the expression. This buffer is parsed to yield the expression to be evaluated. | |
result | The result of the evaluation. |
Evaluates an expression. If the expression doesn't already live in this ClassAd, the setParentScope() method must be called on it first.
expr | The expression to be evaluated. | |
result | The result of the evaluation. |
Evaluates an expression, and returns the significant subexpressions encountered during the evaluation. If the expression doesn't already live in this ClassAd, call the setParentScope() method on it first.
expr | The expression to be evaluated. | |
result | The result of the evaluation. | |
sig | The significant subexpressions of the evaluation. |
iterator ClassAd::find | ( | std::string const & | attrName | ) |
Return an interator pointing to the attribute with a particular name.
const_iterator ClassAd::find | ( | std::string const & | attrName | ) | const |
Return a constant interator pointing to the attribute with a particular name.
iterator ClassAd::find | ( | std::string const & | attrName | ) |
Return an interator pointing to the attribute with a particular name.
const_iterator ClassAd::find | ( | std::string const & | attrName | ) | const |
Return a constant interator pointing to the attribute with a particular name.
Flattens (a partial evaluation operation) the given expression in the context of the classad.
expr | The expression to be flattened. | |
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. |
Flattens (a partial evaluation operation) the given expression in the context of the classad.
expr | The expression to be flattened. | |
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. |
ClassAd* ClassAd::GetChainedParentAd | ( | void | ) |
Return a pointer to the parent ad.
ClassAd * ClassAd::GetChainedParentAd | ( | void | ) |
Return a pointer to the parent ad.
void ClassAd::GetComponents | ( | std::vector< std::pair< std::string, ExprTree * > > & | vec | ) | const |
Deconstructor to get the components of a classad
vec | A vector of (name,expression) pairs which are the attributes of the classad |
void ClassAd::GetComponents | ( | std::vector< std::pair< std::string, ExprTree * > > & | vec | ) | const |
Deconstructor to get the components of a classad
vec | A vector of (name,expression) pairs which are the attributes of the classad |
bool ClassAd::GetExternalReferences | ( | const ExprTree * | tree, | |
References & | refs, | |||
bool | fullNames | |||
) |
Return a list of attribute references in the expression that are not contained within this ClassAd.
tree | The ExprTree for the expression that has references that you are wish to know about. | |
refs | The list of references | |
fullNames | true if you want full names (like other.foo) |
bool ClassAd::GetExternalReferences | ( | const ExprTree * | tree, | |
PortReferences & | refs | |||
) |
bool ClassAd::GetExternalReferences | ( | const ExprTree * | tree, | |
PortReferences & | refs | |||
) |
bool ClassAd::GetExternalReferences | ( | const ExprTree * | tree, | |
References & | refs, | |||
bool | fullNames | |||
) |
Return a list of attribute references in the expression that are not contained within this ClassAd.
tree | The ExprTree for the expression that has references that you are wish to know about. | |
refs | The list of references | |
fullNames | true if you want full names (like other.foo) |
bool ClassAd::GetInternalReferences | ( | const ExprTree * | tree, | |
References & | refs, | |||
bool | fullNames | |||
) |
Return a list of attribute references in the expression that are contained within this ClassAd.
tree | The ExprTree for the expression that has references that you wish to know about. | |
refs | The list of references | |
fullNames | true if you want full names (like other.foo) |
bool ClassAd::GetInternalReferences | ( | const ExprTree * | tree, | |
References & | refs, | |||
bool | fullNames | |||
) |
Return a list of attribute references in the expression that are contained within this ClassAd.
tree | The ExprTree for the expression that has references that you wish to know about. | |
refs | The list of references | |
fullNames | true if you want full names (like other.foo) |
bool ClassAd::Insert | ( | const std::string & | attrName, | |
ExprTree * | expr | |||
) |
Inserts an attribute into the ClassAd. The setParentScope() method is invoked on the inserted expression.
attrName | The name of the attribute. | |
expr | The expression bound to the name. |
bool ClassAd::Insert | ( | const std::string & | attrName, | |
ExprTree * | expr | |||
) |
Inserts an attribute into the ClassAd. The setParentScope() method is invoked on the inserted expression.
attrName | The name of the attribute. | |
expr | The expression bound to the name. |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
int | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into the ClassAd. The integer value is converted into a Literal expression, and then inserted into the classad.
attrName | The name of the attribute. | |
value | The integer value of the attribute. | |
f | The multiplicative factor to be attached to value. |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
bool | value | |||
) |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
const std::string & | value | |||
) |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
double | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into the ClassAd. The real value is converted into a Literal expression, and then inserted into the classad.
attrName | The name of the attribute. | |
value | The real value of the attribute. | |
f | The multiplicative factor to be attached to value. |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
const char * | value | |||
) |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
bool | value | |||
) |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
const std::string & | value | |||
) |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
const char * | value | |||
) |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
double | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into the ClassAd. The real value is converted into a Literal expression, and then inserted into the classad.
attrName | The name of the attribute. | |
value | The real value of the attribute. | |
f | The multiplicative factor to be attached to value. |
bool ClassAd::InsertAttr | ( | const std::string & | attrName, | |
int | value, | |||
Value::NumberFactor | f = Value::NO_FACTOR | |||
) |
Inserts an attribute into the ClassAd. The integer value is converted into a Literal expression, and then inserted into the classad.
attrName | The name of the attribute. | |
value | The integer value of the attribute. | |
f | The multiplicative factor to be attached to value. |
bool ClassAd::IsAttributeDirty | ( | const std::string & | name | ) |
Return true if an attribute is dirty
name | The attribute name |
bool ClassAd::IsAttributeDirty | ( | const std::string & | name | ) |
Return true if an attribute is dirty
name | The attribute name |
ExprTree* ClassAd::Lookup | ( | const std::string & | attrName | ) | const |
ExprTree* ClassAd::Lookup | ( | const std::string & | attrName | ) | const |
Finds the expression bound to an attribute name. The lookup uses the scoping structure (including super
attributes) to determine the expression bound to the given attribute name in the closest enclosing scope. The closest enclosing scope is also returned.
attrName | The name of the attribute. | |
ad | The closest enclosing scope of the returned expression, or NULL if no expression was found. |
Finds the expression bound to an attribute name. The lookup uses the scoping structure (including super
attributes) to determine the expression bound to the given attribute name in the closest enclosing scope. The closest enclosing scope is also returned.
attrName | The name of the attribute. | |
ad | The closest enclosing scope of the returned expression, or NULL if no expression was found. |
static ClassAd* ClassAd::MakeClassAd | ( | std::vector< std::pair< std::string, ExprTree * > > & | vec | ) | [static] |
Factory method to make a classad
vec | A vector of (name,expression) pairs to make a classad |
static ClassAd* ClassAd::MakeClassAd | ( | std::vector< std::pair< std::string, ExprTree * > > & | vec | ) | [static] |
Factory method to make a classad
vec | A vector of (name,expression) pairs to make a classad |
void ClassAd::MarkAttributeClean | ( | const std::string & | name | ) |
Mark a particular attribute as not dirty
name | The attribute name |
void ClassAd::MarkAttributeClean | ( | const std::string & | name | ) |
Mark a particular attribute as not dirty
name | The attribute name |
void ClassAd::MarkAttributeDirty | ( | const std::string & | name | ) |
Mark a particular attribute as dirty
name | The attribute name |
void ClassAd::MarkAttributeDirty | ( | const std::string & | name | ) |
Mark a particular attribute as dirty
name | The attribute name |
void ClassAd::Modify | ( | ClassAd & | ad | ) |
Modify this ClassAd in a specific way Ad is a ClassAd that looks like: [ Context = expr; // Sub-ClassAd to operate on Replace = classad; // ClassAd to Update() replace context Updates = classad; // ClassAd to merge into context (via Update()) Deletes = {a1, a2}; // A list of attribute names to delete from the context
ad | is a description of how to modify this ClassAd |
void ClassAd::Modify | ( | ClassAd & | ad | ) |
Modify this ClassAd in a specific way Ad is a ClassAd that looks like: [ Context = expr; // Sub-ClassAd to operate on Replace = classad; // ClassAd to Update() replace context Updates = classad; // ClassAd to merge into context (via Update()) Deletes = {a1, a2}; // A list of attribute names to delete from the context
ad | is a description of how to modify this ClassAd |
Make a deep copy of the ClassAd, via the == operator.
Make a deep copy of the ClassAd, via the == operator.
ExprTree* ClassAd::Remove | ( | const std::string & | attrName | ) |
Similar to Delete, but the expression is returned rather than deleted from the classad.
attrName | The name of the attribute to be extricated. |
ExprTree* ClassAd::Remove | ( | const std::string & | attrName | ) |
Similar to Delete, but the expression is returned rather than deleted from the classad.
attrName | The name of the attribute to be extricated. |
bool ClassAd::SameAs | ( | const ExprTree * | tree | ) | const [virtual] |
virtual bool ClassAd::SameAs | ( | const ExprTree * | tree | ) | const [virtual] |
int ClassAd::size | ( | void | ) | const [inline] |
Return the number of attributes at the root level of this ClassAd.
int ClassAd::size | ( | void | ) | const [inline] |
Return the number of attributes at the root level of this ClassAd.
void ClassAd::Unchain | ( | void | ) |
If we are chained to a parent ad, remove the chain.
void ClassAd::Unchain | ( | void | ) |
If we are chained to a parent ad, remove the chain.
bool ClassAd::Update | ( | const ClassAd & | ad | ) |
Make sure everything in the ad is in this ClassAd. This is different than CopyFrom() because we may have many things that the ad doesn't have: we just ensure that everything we import everything from the other ad. This could be called Merge().
ad | The ad to copy attributes from. |
bool ClassAd::Update | ( | const ClassAd & | ad | ) |
Make sure everything in the ad is in this ClassAd. This is different than CopyFrom() because we may have many things that the ad doesn't have: we just ensure that everything we import everything from the other ad. This could be called Merge().
ad | The ad to copy attributes from. |
bool ClassAd::UpdateFromChain | ( | const ClassAd & | ad | ) |
Insert all attributes from the other ad and its chained parents into this ad, but do not clear out existing contents of this ad before doing so.
bool ClassAd::UpdateFromChain | ( | const ClassAd & | ad | ) |
Insert all attributes from the other ad and its chained parents into this ad, but do not clear out existing contents of this ad before doing so.
Are the two ClassAds the same? Uses SameAs() to decide if they are the same.
Are the two ClassAds the same? Uses SameAs() to decide if they are the same.