{section: ClassAd Conversion Todo List} This is the set of tasks that need to be done to convert from old to new {quote:ClassAds}. Code changes for this {quote:ToDo} list should be associated with ticket #619. {subsection: Pre-Transition Tasks} *: Check in Varghese's {quote:ClassAdList} class that works with new {quote:ClassAds}. *DONE* *: Add a method to Varghese's new {quote:ClassAdList} to move an ad from one list to another. *DONE* *: Add or fix compatibility for following old {quote:ClassAd} methods: *:: Block {quote:#1} *[3 days]*: *::: ClassAd::Assign() *DONE* *::: ClassAd::LookupString(MyString) *DONE* *::: ClassAd::Insert(const char*) *DONE* *::: ClassAd::Insert(const char*,ExprTree*) *DONE* *::: ClassAd::Lookup() *DONE* *::: ClassAd::put() *Theoretically code complete, needs testing.* *::: ClassAd::initFromStream() *Theoretically code complete, needs testing.* *::: ClassAd::AssignExpr() *DONE* *::: ClassAd::clear() *DONE* *::: ClassAd::EvalString(const char*, const class AttrList*, char**) *DONE* *::: ClassAd::EvalString(const char*, const class AttrList*, MyString&) *DONE* *::: ClassAd::NextNameOriginal() *DONE* *::: ClassAd::ResetName() *DONE* *:: Block {quote:#2} *[4 days]*: *::: ClassAd::sPrintExpr() *DONE* *::: ClassAd::NextExpr() *DONE* *::: ClassAd::NextDirtyExpr() *DONE* *::: ClassAd::SetDirtyFlag() *DONE* *::: ClassAd::GetDirtyFlag() *DONE* *::: ClassAd::ClearAllDirtyFlags() *DONE* *::: ClassAd::GetReferences() *INCOMPLETE* *::: ClassAd::ChainCollapse() *DONE* *::: ClassAd::EscapeStringValue() *DONE, will need callsite changes* *::: ClassAd::CopyAttribute() *DONE* *::: ClassAd::fPrintAsXML() *DONE* *::: ClassAd::sPrintAsXML() *DONE* *::: ClassAd::IsValidAttrValue() *DONE* *::: ExprTree::DeepCopy() *DONE* *::: ClassAd::initFromString() *DONE* *::: ClassAd::GetExprReferences(const char*, StringList&, StringList&) *: Write helper functions for these methods which we can't emulate transparently *[4 hours]*: *:: ExprTree::PrintToNewStr() *DONE* *:: ExprTree::PrintToStr() *DONE* *:: ExprTree::EvalTree() *DONE* *: Write compatibility versions of these free-standing functions that are part of old {quote:ClassAds}: *:: int Parse(const char*s, MyString&name, ExprTree*&tree, int*pos = NULL) *DONE* *:: int ParseClassAdRvalExpr(const char*s, ExprTree*&tree, int*pos = NULL) *DONE* *:: const char * ExprTreeToString( ExprTree*expr ) *DONE* *:: bool EvalBool(ClassAd * ad, const char * constraint) *DONE* *:: bool EvalBool(AttrList * ad, ExprTree * tree) *DONE* *:: bool ClassAdsAreSame( ClassAd * ad1, ClassAd * ad2, StringList * ignored_attrs=NULL, bool verbose=false ) *DONE* *:: bool IsAMatch(const ClassAd * ad1, const ClassAd * ad2) *DONE* *:: bool IsAHalfMatch(const ClassAd * request, const ClassAd * offer) *DONE* *: Add {quote:ClassAds} functions that are in old {quote:ClassAds} but not in new {quote:ClassAds} *[2 days]*: *:: *Note: these are known as FunctionStringlistFOO, and are in condor_ast.cpp* *:: stringListSize() *:: stringListSum() *:: stringListAve() *:: stringListMin() *:: stringListMax() *:: stringListMember() *:: stringListIMember() *:: stringListRegexpMember() *: #952 - Arrange header and make files so that switching between old and new {quote:ClassAds} can be done with the flip of a switch. *[1 day]*. *: Fix up the one or two callsites in matchmaker.cpp that move an ad from one {quote:ClassAdList} to another *DONE*. *: The following methods will need some fixing at the callsites *[5 days]*: *:: ExprTree::RArg() *DONE* *:: ExprTree::LArg() *DONE* *:: ExprTree::PrintToNewStr() *DONE* *:: ExprTree::EvalTree() *DONE* *:: ClassAd(char*,char) *DONE* *:: ExprTree::PrintToStr() *DONE* *:: ExprTree::MyType() *DONE* *:: ClassAd::ExchangeExpressions() *DONE* *:: ClassAd::unchain() *DONE* *:: ClassAd::RestoreChain() *DONE* *:: AttrList::put() *DONE* *:: AttrList::initFromStream() *DONE* *: AttrList::SetPrivateAttributesInvisible() causes private attributes to be omitted from subsequent calls to fPrint(), sPrint(), dPrint() and putAttrList(). SetPrivateAttributesInvisible() needs to be added to {quote:CompatClassAd} and its value needs to affect those subsequent calls. *DONE* {subsection: Post-Transition Tasks} *: As time permits, rewrite callsites to make {quote:CompatClassAd} unnecessary. The modified callsites can either use native new {quote:ClassAd} methods or newly-written free-standing functions. *:: Replace all usage of attribute {quote:CurrentTime} with {quote:ClassAd} function time(). This can start before the flag day.