Logo Search packages:      
Sourcecode: condor version File versions  Download package

ClassAd Class Reference

#include <classad.h>

Inheritance diagram for ClassAd:

ExprTree MatchClassAd

List of all members.

Detailed Description

The ClassAd object represents a parsed ClassAd.

Definition at line 51 of file classad.h.

STL-like Iterators

typedef AttrList::const_iterator const_iterator
typedef AttrList::iterator iterator
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)
int size (void) const

Dirty Tracking

typedef DirtyAttrList::iterator dirtyIterator
void ClearAllDirtyFlags (void)
dirtyIterator dirtyBegin ()
dirtyIterator dirtyEnd ()
void DisableDirtyTracking (void)
void EnableDirtyTracking (void)
bool IsAttributeDirty (const std::string &name)
void MarkAttributeClean (const std::string &name)
void MarkAttributeDirty (const std::string &name)


bool operator== (ClassAd &list1, ClassAd &list2)
virtual ExprTreeCopy () const
bool CopyFrom (const ClassAd &ad)
bool Flatten (const ExprTree *expr, Value &val, ExprTree *&fexpr) const
bool FlattenAndInline (const ExprTree *expr, Value &val, ExprTree *&fexpr) const
void GetComponents (std::vector< std::pair< std::string, ExprTree * > > &vec) const
bool GetExternalReferences (const ExprTree *tree, PortReferences &refs)
bool GetExternalReferences (const ExprTree *tree, References &refs, bool fullNames)
void Modify (ClassAd &ad)
ClassAdoperator= (const ClassAd &rhs)
virtual bool SameAs (const ExprTree *tree) const
bool Update (const ClassAd &ad)
static ClassAdMakeClassAd (std::vector< std::pair< std::string, ExprTree * > > &vec)

Public Types

enum  NodeKind {
 The kinds of nodes in expression trees. More...

Public Member Functions

int Assign (char const *variable, bool value)
int Assign (char const *variable, double value)
int Assign (char const *variable, float value)
int Assign (char const *variable, int value)
int Assign (char const *variable, char const *value)
int Assign (char const *variable, MyString &value)
int AssignExpr (char const *variable, char const *value)
virtual int CalcPrintToStr (void)
void ChainCollapse (bool with_deep_copy=true)
void ChainToAd (AttrList *)
 ClassAd (const ClassAd &)
 ClassAd (char *, char)
 ClassAd (FILE *, char *, int &, int &, int &)
void clear (void)
void CopyAttribute (char const *target_attr, AttrList *source_ad)
void CopyAttribute (char const *target_attr, char const *source_attr, AttrList *source_ad=NULL)
virtual ExprTreeDeepCopy (void) const =0
int Delete (const char *)
virtual void Display ()
void dPrint (int)
int EvalBool (const char *, const class AttrList *, int &) const
int EvalFloat (const char *, const class AttrList *, float &) const
int EvalInteger (const char *, const class AttrList *, int &) const
int EvalString (const char *, const class AttrList *, MyString &value) const
int EvalString (const char *, const class AttrList *, char **value) const
int EvalString (const char *, const class AttrList *, char *) const
int EvalTree (const AttrList *, const AttrList *, EvalResult *)
int EvalTree (const AttrList *, EvalResult *)
bool Evaluate (Value &v) const
bool Evaluate (EvalState &state, Value &val) const
void ExchangeExpressions (class ClassAd *)
class ClassAdFindNext ()
virtual int fPrint (FILE *)
int fPrintAsXML (FILE *F)
int fPrintExpr (FILE *, char *)
void GetDirtyFlag (const char *name, bool *exists, bool *dirty)
bool GetExprReferences (const char *expr, StringList &internal_references, StringList &external_references) const
bool GetInvisible (char const *name)
NodeKind GetKind (void) const
const char * GetMyTypeName ()
 my type name set.
int GetMyTypeNumber ()
const ClassAdGetParentScope () const
ExprTreeGetRankExpr (void)
virtual void GetReferences (const AttrList *base_attrlist, StringList &internal_references, StringList &external_references) const
void GetReferences (const char *attribute, StringList &internal_references, StringList &external_references) const
ExprTreeGetRequirements (void)
int GetSequenceNumber (void)
const char * GetTargetTypeName ()
int GetTargetTypeNumber ()
int initFromStream (Stream &s)
bool initFromString (char const *str, MyString *err_msg=NULL)
int Insert (ExprTree *, bool check_for_dups=true)
int Insert (const char *, bool check_for_dups=true)
int InsertOrUpdate (const char *expr)
int IsAMatch (class ClassAd *)
bool IsExternalReference (const char *name, char **simplified_name) const
int IsInList (AttrListList *)
virtual ExprTreeLArg ()
ExprTreeLookup (const ExprTree *) const
ExprTreeLookup (const char *) const
ExprTreeLookup (char *) const
bool LookupBool (const char *, bool &) const
int LookupBool (const char *, int &) const
AttrListElem * LookupElem (const char *name) const
int LookupFloat (const char *, float &) const
int LookupInteger (const char *, int &) const
int LookupString (const char *name, MyString &value) const
int LookupString (const char *name, char **value) const
int LookupString (const char *, char *, int) const
int LookupString (const char *, char *) const
int LookupTime (const char *name, struct tm *time, bool *is_utc) const
int LookupTime (const char *name, char **value) const
LexemeType MyType ()
ExprTreeNextDirtyExpr ()
char * NextDirtyName ()
ExprTreeNextExpr ()
char * NextName ()
const char * NextNameOriginal ()
virtual int operator< (ExprTree &)
virtual int operator<= (ExprTree &)
ClassAdoperator= (const ClassAd &other)
virtual int operator== (ExprTree &)
virtual int operator> (ExprTree &)
virtual int operator>= (ExprTree &)
virtual void PrintToNewStr (char **str)
virtual void PrintToStr (MyString &)
virtual void PrintToStr (char *)
void Puke () const
 A debugging method; send expression to stdout.
int put (Stream &s)
virtual ExprTreeRArg ()
void ResetExpr ()
void ResetName ()
void RestoreChain (const ChainedPair &p)
void SetDirtyFlag (const char *name, bool dirty)
bool SetInvisible (char const *name, bool make_invisible=true)
void SetMyTypeName (const char *)
void SetParentScope (const ClassAd *p)
void SetPrivateAttributesInvisible (bool make_invisible)
void SetSequenceNumber (int)
void SetTargetTypeName (const char *)
int sPrint (MyString &output)
int sPrintAsXML (MyString &output)
char * sPrintExpr (char *, unsigned int, const char *)
int Type ()
ChainedPair unchain (void)
Chaining functions
void ChainToAd (ClassAd *new_chain_parent_ad)
bool CopyFromChain (const ClassAd &ad)
ClassAdGetChainedParentAd (void)
void Unchain (void)
bool UpdateFromChain (const ClassAd &ad)
 ClassAd (const ClassAd &ad)
 ClassAd ()
 Default constructor.
virtual ~ClassAd ()
Attribute Deletion Methods
void Clear ()
bool DeepDelete (ExprTree *scopeExpr, const std::string &attrName)
bool DeepDelete (const std::string &scopeExpr, const std::string &attrName)
ExprTreeDeepRemove (ExprTree *scopeExpr, const std::string &attrName)
ExprTreeDeepRemove (const std::string &scopeExpr, const std::string &attrName)
bool Delete (const std::string &attrName)
ExprTreeRemove (const std::string &attrName)
Insertion Methods
bool DeepInsert (ExprTree *scopeExpr, const std::string &attrName, ExprTree *expr)
bool DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, const std::string &value)
bool DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, const char *value)
bool DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, bool value)
bool DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR)
bool DeepInsertAttr (ExprTree *scopeExpr, const std::string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR)
bool Insert (const std::string &attrName, ExprTree *expr)
bool InsertAttr (const std::string &attrName, const std::string &value)
bool InsertAttr (const std::string &attrName, const char *value)
bool InsertAttr (const std::string &attrName, bool value)
bool InsertAttr (const std::string &attrName, double value, Value::NumberFactor f=Value::NO_FACTOR)
bool InsertAttr (const std::string &attrName, int value, Value::NumberFactor f=Value::NO_FACTOR)
Evaluation Methods
bool EvaluateAttr (const std::string &attrName, Value &result) const
bool EvaluateAttrBool (const std::string &attr, bool &boolValue) const
bool EvaluateAttrClassAd (const std::string &attr, ClassAd *&classad) const
bool EvaluateAttrInt (const std::string &attr, int &intValue) const
bool EvaluateAttrList (const std::string &attr, ExprList *&l) const
bool EvaluateAttrNumber (const std::string &attr, double &realValue) const
bool EvaluateAttrNumber (const std::string &attr, int &intValue) const
bool EvaluateAttrReal (const std::string &attr, double &realValue) const
bool EvaluateAttrString (const std::string &attr, std::string &buf) const
bool EvaluateAttrString (const std::string &attr, char *buf, int len) const
bool EvaluateExpr (const ExprTree *expr, Value &result, ExprTree *&sig) const
bool EvaluateExpr (const ExprTree *expr, Value &result) const
bool EvaluateExpr (const std::string &buf, Value &result) const
Lookup Methods
ExprTreeLookup (const std::string &attrName) const
ExprTreeLookupInScope (const std::string &attrName, const ClassAd *&ad) const

Static Public Member Functions

static bool ClassAdAttributeIsPrivate (char const *name)
static char const * EscapeStringValue (char const *val, MyString &buf)
static bool IsValidAttrName (const char *)
static bool IsValidAttrValue (const char *)

Public Attributes

bool invisible
char unit

Protected Types

enum  {

Protected Member Functions

virtual int _EvalTree (const AttrList *, const AttrList *, EvalResult *)=0
virtual int _EvalTree (const class AttrList *, EvalResult *)=0
virtual void CopyBaseExprTree (class ExprTree *const recipient) const
void CopyFrom (const ExprTree &literal)
bool Evaluate (EvalState &, Value &, ExprTree *&) const
bool Evaluate (Value &v, ExprTree *&t) const
bool Flatten (EvalState &, Value &, ExprTree *&, int *=NULL) const
bool Flatten (Value &val, ExprTree *&tree) const
int UpdateAgg (ExprTree *, int)

Protected Attributes

AttrListList * associatedList
HashTable< YourString,
AttrListElem * > * 
AttrListElem ** chainedAttrs
bool evalFlag
AttrListElem * exprList
HashTable< YourString,
AttrListElem * > * 
class AttrListList * inList
class AttrListAbstract * next
NodeKind nodeKind
const ClassAdparentScope
class AttrListAbstract * prev
AttrListElem * ptrExpr
bool ptrExprInChain
AttrListElem * ptrName
bool ptrNameInChain
int seq
AttrListElem * tail
LexemeType type
int type

Static Protected Attributes

static StringSpacestring_space
static int string_space_references

Private Member Functions

virtual bool _Evaluate (EvalState &, Value &, ExprTree *&) const
virtual bool _Evaluate (EvalState &, Value &) const
virtual bool _Flatten (EvalState &, Value &, ExprTree *&, int *) const
ClassAd_GetDeepScope (ExprTree *) const
ClassAd_GetDeepScope (const std::string &) const
bool _GetExternalReferences (const ExprTree *, ClassAd *, EvalState &, PortReferences &)
bool _GetExternalReferences (const ExprTree *, ClassAd *, EvalState &, References &, bool fullNames)
virtual void _SetParentScope (const ClassAd *p)
int LookupInScope (const std::string &, ExprTree *&, EvalState &) const
void updateBoundVariables ()

Private Attributes

AttrList attrList
DirtyAttrList dirtyAttrList
bool do_dirty_tracking
AdType * myType
AdType * targetType


class AttributeReference
class AttrList
class AttrListList
class AttrListRep
class ClassAd
class ClassAdIterator
class ClassAdList
class EvalState
class ExprTree
bool operator<= (class ClassAd &, class ClassAd &)
bool operator== (class ClassAd &, class ClassAd &)
bool operator>= (class ClassAd &, class ClassAd &)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index