Public Member Functions | Public Attributes | Friends

ClassAd Class Reference

The ClassAd object represents a parsed ClassAd. More...

#include <classad.h>

Inheritance diagram for ClassAd:
ExprTree ExprTree MatchClassAd MatchClassAd

List of all members.

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

ExprTreeLookup (const std::string &attrName) const
ExprTreeLookupInScope (const std::string &attrName, const ClassAd *&ad) const
ExprTreeLookup (const std::string &attrName) const
ExprTreeLookupInScope (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)
ExprTreeRemove (const std::string &attrName)
ExprTreeDeepRemove (const std::string &scopeExpr, const std::string &attrName)
ExprTreeDeepRemove (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)
ExprTreeRemove (const std::string &attrName)
ExprTreeDeepRemove (const std::string &scopeExpr, const std::string &attrName)
ExprTreeDeepRemove (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)
ClassAdGetChainedParentAd (void)
bool CopyFromChain (const ClassAd &ad)
bool UpdateFromChain (const ClassAd &ad)
void ChainToAd (ClassAd *new_chain_parent_ad)
void Unchain (void)
ClassAdGetChainedParentAd (void)
bool CopyFromChain (const ClassAd &ad)
bool UpdateFromChain (const ClassAd &ad)

Public Attributes

ClassAdalternateScope

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 ExprTreeCopy () const
ClassAdoperator= (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 ExprTreeCopy () const
ClassAdoperator= (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 ClassAdMakeClassAd (std::vector< std::pair< std::string, ExprTree * > > &vec)
static ClassAdMakeClassAd (std::vector< std::pair< std::string, ExprTree * > > &vec)

Detailed Description

The ClassAd object represents a parsed ClassAd.


Member Typedef Documentation

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


Constructor & Destructor Documentation

ClassAd::ClassAd ( const ClassAd ad  ) 

Copy constructor

Parameters:
ad The ClassAd to copy
ClassAd::ClassAd ( const ClassAd ad  ) 

Copy constructor

Parameters:
ad The ClassAd to copy

Member Function Documentation

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.

Parameters:
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.

Parameters:
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]

Makes a deep copy of the ClassAd.

Returns:
A deep copy of the ClassAd, or NULL on failure.

Implements ExprTree.

virtual ExprTree* ClassAd::Copy (  )  const [virtual]

Makes a deep copy of the ClassAd.

Returns:
A deep copy of the ClassAd, or NULL on failure.

Implements ExprTree.

bool ClassAd::CopyFrom ( const ClassAd ad  ) 

Fill in this ClassAd with the contents of the other ClassAd. This ClassAd is cleared of its contents before the copy happens.

Returns:
true if the copy succeeded, false otherwise.
bool ClassAd::CopyFrom ( const ClassAd ad  ) 

Fill in this ClassAd with the contents of the other ClassAd. This ClassAd is cleared of its contents before the copy happens.

Returns:
true if the copy succeeded, false otherwise.
bool ClassAd::CopyFromChain ( const ClassAd ad  ) 

Fill in this ClassAd with the contents of the other ClassAd, including any attributes from the other ad's chained parent. Any previous contents of this ad are cleared.

Returns:
true if the copy succeeded, false otherwise.
bool ClassAd::CopyFromChain ( const ClassAd ad  ) 

Fill in this ClassAd with the contents of the other ClassAd, including any attributes from the other ad's chained parent. Any previous contents of this ad are cleared.

Returns:
true if the copy succeeded, false otherwise.
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.

Parameters:
scopeExpr The scope expression.
attrName The name of the attribute to be delete.
Returns:
true if the attribute previously existed and was successfully removed, false otherwise.
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.

Parameters:
scopeExpr String representation of the scope expression.
attrName The name of the attribute to be delete.
Returns:
true if the attribute previously existed and was successfully removed, false otherwise.
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.

Parameters:
scopeExpr String representation of the scope expression.
attrName The name of the attribute to be delete.
Returns:
true if the attribute previously existed and was successfully removed, false otherwise.
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.

Parameters:
scopeExpr The scope expression.
attrName The name of the attribute to be delete.
Returns:
true if the attribute previously existed and was successfully removed, false otherwise.
bool ClassAd::DeepInsert ( ExprTree scopeExpr,
const std::string &  attrName,
ExprTree expr 
)

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.

Parameters:
scopeExpr The scope expression.
attrName The name of the attribute.
expr The expression bound to the name.
Returns:
true if the operation succeeded, false otherwise.
See also:
ExprTree::setParentScope
bool ClassAd::DeepInsert ( ExprTree scopeExpr,
const std::string &  attrName,
ExprTree expr 
)

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.

Parameters:
scopeExpr The scope expression.
attrName The name of the attribute.
expr The expression bound to the name.
Returns:
true if the operation succeeded, false otherwise.
See also:
ExprTree::setParentScope
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.

Parameters:
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.

Parameters:
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.
See also:
Value::NumberFactor
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.

Parameters:
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.
See also:
Value::NumberFactor
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.

Parameters:
scopeExpr String representation of the scope expression.
attrName The name of the attribute.
value The string attribute
f A multipler for the number.
See also:
Value::NumberFactor
Returns:
true on success, false otherwise
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
scopeExpr String representation of the scope expression.
attrName The name of the attribute.
value The string attribute
f A multipler for the number.
See also:
Value::NumberFactor
Returns:
true on success, false otherwise
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.

Parameters:
scopeExpr String representation of the scope expression
attrName The name of the attribute to be extricated.
Returns:
The expression tree of the named attribute, or NULL if the attribute could not be found.
See also:
Delete
ExprTree* ClassAd::DeepRemove ( ExprTree scopeExpr,
const std::string &  attrName 
)

Similar to DeepDelete, but the expression is returned rather than deleted from the classad.

Parameters:
scopeExpr The scope expression
attrName The name of the attribute to be extricated.
Returns:
The expression tree of the named attribute, or NULL if the attribute could not be found.
See also:
Delete
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.

Parameters:
scopeExpr String representation of the scope expression
attrName The name of the attribute to be extricated.
Returns:
The expression tree of the named attribute, or NULL if the attribute could not be found.
See also:
Delete
ExprTree* ClassAd::DeepRemove ( ExprTree scopeExpr,
const std::string &  attrName 
)

Similar to DeepDelete, but the expression is returned rather than deleted from the classad.

Parameters:
scopeExpr The scope expression
attrName The name of the attribute to be extricated.
Returns:
The expression tree of the named attribute, or NULL if the attribute could not be found.
See also:
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.

Parameters:
attrName The name of the attribute to be delete.
Returns:
true if the attribute previously existed and was successfully removed, false otherwise.
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.

Parameters:
attrName The name of the attribute to be delete.
Returns:
true if the attribute previously existed and was successfully removed, false otherwise.
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.

Parameters:
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.

Parameters:
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.

Parameters:
attr The name of the attribute.
boolValue The value of the attribute.
Returns:
true if attrName evaluated to a boolean value, false otherwise.
bool ClassAd::EvaluateAttrBool ( const std::string &  attr,
bool &  boolValue 
) const

Evaluates an attribute to a boolean. A pointer to the string is returned.

Parameters:
attr The name of the attribute.
boolValue The value of the attribute.
Returns:
true if attrName evaluated to a boolean value, false otherwise.
bool ClassAd::EvaluateAttrClassAd ( const std::string &  attr,
ClassAd *&  classad 
) const

Evaluates an attribute to a ClassAd. A pointer to the ClassAd is returned. You do not own the ClassAd--do not free it.

Parameters:
attr The name of the attribute.
classad The value of the attribute.
Returns:
true if attrName evaluated to a ClassAd, false otherwise.
bool ClassAd::EvaluateAttrClassAd ( const std::string &  attr,
ClassAd *&  classad 
) const

Evaluates an attribute to a ClassAd. A pointer to the ClassAd is returned. You do not own the ClassAd--do not free it.

Parameters:
attr The name of the attribute.
classad The value of the attribute.
Returns:
true if attrName evaluated to a ClassAd, false otherwise.
bool ClassAd::EvaluateAttrInt ( const std::string &  attr,
int &  intValue 
) const

Evaluates an attribute to an integer.

Parameters:
attr The name of the attribute.
intValue The value of the attribute.
Returns:
true if attrName evaluated to an integer, false otherwise.
bool ClassAd::EvaluateAttrInt ( const std::string &  attr,
int &  intValue 
) const

Evaluates an attribute to an integer.

Parameters:
attr The name of the attribute.
intValue The value of the attribute.
Returns:
true if attrName evaluated to an integer, false otherwise.
bool ClassAd::EvaluateAttrList ( const std::string &  attr,
ExprList *&  l 
) const

Evaluates an attribute to an ExprList. A pointer to the ExprList is returned. You do not own the ExprList--do not free it.

Parameters:
attr The name of the attribute.
l The value of the attribute.
Returns:
true if attrName evaluated to a ExprList, false otherwise.
bool ClassAd::EvaluateAttrList ( const std::string &  attr,
ExprList *&  l 
) const

Evaluates an attribute to an ExprList. A pointer to the ExprList is returned. You do not own the ExprList--do not free it.

Parameters:
attr The name of the attribute.
l The value of the attribute.
Returns:
true if attrName evaluated to a ExprList, false otherwise.
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.

Parameters:
attr The name of the attribute.
intValue The value of the attribute.
Returns:
true if attrName evaluated to an number, false otherwise.
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.

Parameters:
attr The name of the attribute.
realValue The value of the attribute.
Returns:
true if attrName evaluated to a number, false otherwise.
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.

Parameters:
attr The name of the attribute.
intValue The value of the attribute.
Returns:
true if attrName evaluated to an number, false otherwise.
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.

Parameters:
attr The name of the attribute.
realValue The value of the attribute.
Returns:
true if attrName evaluated to a number, false otherwise.
bool ClassAd::EvaluateAttrReal ( const std::string &  attr,
double &  realValue 
) const

Evaluates an attribute to a real.

Parameters:
attr The name of the attribute.
realValue The value of the attribute.
Returns:
true if attrName evaluated to a real, false otherwise.
bool ClassAd::EvaluateAttrReal ( const std::string &  attr,
double &  realValue 
) const

Evaluates an attribute to a real.

Parameters:
attr The name of the attribute.
realValue The value of the attribute.
Returns:
true if attrName evaluated to a real, false otherwise.
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.

Parameters:
attr The name of the attribute.
buf The buffer for the string value.
Returns:
true iff attrName evaluated to a string
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.

Parameters:
attr The name of the attribute.
buf The buffer for the string value.
len Size of buffer
Returns:
true iff attrName evaluated to a string
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.

Parameters:
attr The name of the attribute.
buf The buffer for the string value.
Returns:
true iff attrName evaluated to a string
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.

Parameters:
attr The name of the attribute.
buf The buffer for the string value.
len Size of buffer
Returns:
true iff attrName evaluated to a string
bool ClassAd::EvaluateExpr ( const ExprTree expr,
Value result 
) const

Evaluates an expression. If the expression doesn't already live in this ClassAd, the setParentScope() method must be called on it first.

Parameters:
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.

Parameters:
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.
Returns:
true if the operation succeeded, false otherwise.
bool ClassAd::EvaluateExpr ( const ExprTree expr,
Value result,
ExprTree *&  sig 
) const

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.

Parameters:
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.

Parameters:
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.
Returns:
true if the operation succeeded, false otherwise.
bool ClassAd::EvaluateExpr ( const ExprTree expr,
Value result 
) const

Evaluates an expression. If the expression doesn't already live in this ClassAd, the setParentScope() method must be called on it first.

Parameters:
expr The expression to be evaluated.
result The result of the evaluation.
bool ClassAd::EvaluateExpr ( const ExprTree expr,
Value result,
ExprTree *&  sig 
) const

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.

Parameters:
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.

bool ClassAd::Flatten ( const ExprTree expr,
Value val,
ExprTree *&  fexpr 
) const

Flattens (a partial evaluation operation) the given expression in the context of the classad.

Parameters:
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.
Returns:
true if the flattening was successful, and false otherwise.
bool ClassAd::Flatten ( const ExprTree expr,
Value val,
ExprTree *&  fexpr 
) const

Flattens (a partial evaluation operation) the given expression in the context of the classad.

Parameters:
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.
Returns:
true if the flattening was successful, and false 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

Parameters:
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

Parameters:
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.

Parameters:
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)
Returns:
true on success, false on failure.
bool ClassAd::GetExternalReferences ( const ExprTree tree,
PortReferences &  refs 
)

Return a list of attribute references in the expression that are not contained within this ClassAd.

Parameters:
tree The ExprTree for the expression that has references that you are wish to know about.
refs The list of references
Returns:
true on success, false on failure.
bool ClassAd::GetExternalReferences ( const ExprTree tree,
PortReferences &  refs 
)

Return a list of attribute references in the expression that are not contained within this ClassAd.

Parameters:
tree The ExprTree for the expression that has references that you are wish to know about.
refs The list of references
Returns:
true on success, false on failure.
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.

Parameters:
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)
Returns:
true on success, false on failure.
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.

Parameters:
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)
Returns:
true on success, false on failure.
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.

Parameters:
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)
Returns:
true on success, false on failure.
bool ClassAd::Insert ( const std::string &  attrName,
ExprTree expr 
)

Inserts an attribute into the ClassAd. The setParentScope() method is invoked on the inserted expression.

Parameters:
attrName The name of the attribute.
expr The expression bound to the name.
Returns:
true if the operation succeeded, false otherwise.
See also:
ExprTree::setParentScope
bool ClassAd::Insert ( const std::string &  attrName,
ExprTree expr 
)

Inserts an attribute into the ClassAd. The setParentScope() method is invoked on the inserted expression.

Parameters:
attrName The name of the attribute.
expr The expression bound to the name.
Returns:
true if the operation succeeded, false otherwise.
See also:
ExprTree::setParentScope
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.

Parameters:
attrName The name of the attribute.
value The integer value of the attribute.
f The multiplicative factor to be attached to value.
See also:
Value::NumberFactor e
bool ClassAd::InsertAttr ( const std::string &  attrName,
bool  value 
)

Inserts an attribute into the ClassAd. The boolean value is converted into a Literal expression, and then inserted into the classad.

Parameters:
attrName The name of the attribute.
value The boolean value of the attribute.
bool ClassAd::InsertAttr ( const std::string &  attrName,
const std::string &  value 
)

Inserts an attribute into the ClassAd. The string value is converted into a Literal expression, and then inserted into the classad.

Parameters:
attrName The name of the attribute.
value The string attribute
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.

Parameters:
attrName The name of the attribute.
value The real value of the attribute.
f The multiplicative factor to be attached to value.
See also:
Value::NumberFactor
Returns:
true on success, false otherwise
bool ClassAd::InsertAttr ( const std::string &  attrName,
const char *  value 
)

Inserts an attribute into the ClassAd. The string value is converted into a Literal expression, and then inserted into the classad.

Parameters:
attrName The name of the attribute.
value The string attribute
bool ClassAd::InsertAttr ( const std::string &  attrName,
bool  value 
)

Inserts an attribute into the ClassAd. The boolean value is converted into a Literal expression, and then inserted into the classad.

Parameters:
attrName The name of the attribute.
value The boolean value of the attribute.
bool ClassAd::InsertAttr ( const std::string &  attrName,
const std::string &  value 
)

Inserts an attribute into the ClassAd. The string value is converted into a Literal expression, and then inserted into the classad.

Parameters:
attrName The name of the attribute.
value The string attribute
bool ClassAd::InsertAttr ( const std::string &  attrName,
const char *  value 
)

Inserts an attribute into the ClassAd. The string value is converted into a Literal expression, and then inserted into the classad.

Parameters:
attrName The name of the attribute.
value The string attribute
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.

Parameters:
attrName The name of the attribute.
value The real value of the attribute.
f The multiplicative factor to be attached to value.
See also:
Value::NumberFactor
Returns:
true on success, false otherwise
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.

Parameters:
attrName The name of the attribute.
value The integer value of the attribute.
f The multiplicative factor to be attached to value.
See also:
Value::NumberFactor e
bool ClassAd::IsAttributeDirty ( const std::string &  name  ) 

Return true if an attribute is dirty

Parameters:
name The attribute name
Returns:
true if the attribute is dirty, false otherwise
bool ClassAd::IsAttributeDirty ( const std::string &  name  ) 

Return true if an attribute is dirty

Parameters:
name The attribute name
Returns:
true if the attribute is dirty, false otherwise
ExprTree* ClassAd::Lookup ( const std::string &  attrName  )  const

Finds the expression bound to an attribute name. The lookup only involves this ClassAd; scoping information is ignored.

Parameters:
attrName The name of the attribute.
Returns:
The expression bound to the name in the ClassAd, or NULL otherwise.
ExprTree* ClassAd::Lookup ( const std::string &  attrName  )  const

Finds the expression bound to an attribute name. The lookup only involves this ClassAd; scoping information is ignored.

Parameters:
attrName The name of the attribute.
Returns:
The expression bound to the name in the ClassAd, or NULL otherwise.
ExprTree* ClassAd::LookupInScope ( const std::string &  attrName,
const ClassAd *&  ad 
) 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.

Parameters:
attrName The name of the attribute.
ad The closest enclosing scope of the returned expression, or NULL if no expression was found.
Returns:
The expression bound to the name in the ClassAd, or NULL otherwise.
ExprTree* ClassAd::LookupInScope ( const std::string &  attrName,
const ClassAd *&  ad 
) 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.

Parameters:
attrName The name of the attribute.
ad The closest enclosing scope of the returned expression, or NULL if no expression was found.
Returns:
The expression bound to the name in the ClassAd, or NULL otherwise.
static ClassAd* ClassAd::MakeClassAd ( std::vector< std::pair< std::string, ExprTree * > > &  vec  )  [static]

Factory method to make a classad

Parameters:
vec A vector of (name,expression) pairs to make a classad
Returns:
The constructed classad
static ClassAd* ClassAd::MakeClassAd ( std::vector< std::pair< std::string, ExprTree * > > &  vec  )  [static]

Factory method to make a classad

Parameters:
vec A vector of (name,expression) pairs to make a classad
Returns:
The constructed classad
void ClassAd::MarkAttributeClean ( const std::string &  name  ) 

Mark a particular attribute as not dirty

Parameters:
name The attribute name
void ClassAd::MarkAttributeClean ( const std::string &  name  ) 

Mark a particular attribute as not dirty

Parameters:
name The attribute name
void ClassAd::MarkAttributeDirty ( const std::string &  name  ) 

Mark a particular attribute as dirty

Parameters:
name The attribute name
void ClassAd::MarkAttributeDirty ( const std::string &  name  ) 

Mark a particular attribute as dirty

Parameters:
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

Parameters:
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

Parameters:
ad is a description of how to modify this ClassAd
ClassAd & ClassAd::operator= ( const ClassAd rhs  ) 

Make a deep copy of the ClassAd, via the == operator.

ClassAd& ClassAd::operator= ( const ClassAd rhs  ) 

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.

Parameters:
attrName The name of the attribute to be extricated.
Returns:
The expression tree of the named attribute, or NULL if the attribute could not be found.
See also:
Delete
ExprTree* ClassAd::Remove ( const std::string &  attrName  ) 

Similar to Delete, but the expression is returned rather than deleted from the classad.

Parameters:
attrName The name of the attribute to be extricated.
Returns:
The expression tree of the named attribute, or NULL if the attribute could not be found.
See also:
Delete
bool ClassAd::SameAs ( const ExprTree tree  )  const [virtual]

Is this ClassAd the same as the tree? Two ClassAds are identical if they have the same number of elements, and each is the SameAs() the other. This is a deep comparison.

Returns:
true if it is the same, false otherwise

Implements ExprTree.

virtual bool ClassAd::SameAs ( const ExprTree tree  )  const [virtual]

Is this ClassAd the same as the tree? Two ClassAds are identical if they have the same number of elements, and each is the SameAs() the other. This is a deep comparison.

Returns:
true if it is the same, false otherwise

Implements ExprTree.

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().

Parameters:
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().

Parameters:
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.

Returns:
true if the operation succeeded, false otherwise.
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.

Returns:
true if the operation succeeded, false otherwise.

Friends And Related Function Documentation

bool operator== ( ClassAd list1,
ClassAd list2 
) [friend]

Are the two ClassAds the same? Uses SameAs() to decide if they are the same.

Returns:
true if they are, false otherwise.
bool operator== ( ClassAd list1,
ClassAd list2 
) [friend]

Are the two ClassAds the same? Uses SameAs() to decide if they are the same.

Returns:
true if they are, false otherwise.

The documentation for this class was generated from the following files:
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends