{section: ClassAd Conversion Todo List}

This is the set of tasks that need to be done to convert from old to new {quote:ClassAds}.

There are two lists. The first list contains items that can be done without affecting Condor current usage of old {quote:ClassAds}. This mainly consists of adding compatibility functions to new {quote:ClassAds} that emulate the API of old {quote:ClassAds}. The second list contains items that will break Condor's usage of old {quote:ClassAds}. These are mainly changing callsites for old {ClassAd} methods that can't be easily emulated through a compatibility function. This second list should be performed within a short time period once we're ready to 'pull the trigger' on converting to new {quote:ClassAds}.

{subsection: Pre-Flag Day 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()
*::: ClassAd::initFromStream()
*::: ClassAd::AssignExpr() *DONE*
*::: ClassAd::clear() *DONE*
*::: ClassAd::EvalString(const char*, const class AttrList*, char**)
*::: ClassAd::EvalString(const char*, const class AttrList*, MyString&)
*::: ClassAd::NextNameOriginal() *DONE*
*::: ClassAd::ResetName() *DONE*
*:: Block {quote:#2} *[4 days]*:
*::: ClassAd::sPrintExpr()
*::: ClassAd::NextExpr()
*::: ClassAd::NextDirtyExpr() *DONE*
*::: ClassAd::SetDirtyFlag()
*::: ClassAd::GetDirtyFlag()
*::: ClassAd::ClearAllDirtyFlags()
*::: ClassAd::GetReferences()
*::: ClassAd::ChainCollapse()
*::: ClassAd::EscapeStringValue()
*::: ClassAd::CopyAttribute()
*::: ClassAd::fPrintAsXML()
*::: ClassAd::sPrintAsXML()
*::: ClassAd::IsValidAttrValue()
*::: ClassAd::operator==()
*::: ClassAd::operator>=()
*::: ClassAd::operator<=()
*::: ExprTree::DeepCopy() *DONE*

*: Write helper functions for these methods which we can't emulate transparently *[4 hours]*:
*:: ExprTree::PrintToNewStr() *DONE*
*:: ExprTree::PrintToStr() *DONE*
*:: ExprTree::EvalTree()

*: 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)
*:: int ParseClassAdRvalExpr(const char*s, ExprTree*&tree, int*pos = NULL)
*:: const char * ExprTreeToString( ExprTree*expr )
*:: bool EvalBool(ClassAd *ad, const char *constraint)
*:: bool EvalBool(AttrList * ad, ExprTree * tree)
*:: bool ClassAdsAreSame( ClassAd * ad1, ClassAd * ad2,
StringList * ignored_attrs=NULL, bool verbose=false );

*: 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()


{subsection: Flag Day Tasks}

*: Change most or all references to {quote:ClassAd} and {quote:AttrList} with {quote:CompatClassAd} *[4 hours]*.

*: Swap in Varghese's new {quote:ClassAdList} class *[?]*.

*: Fix up the one or two callsites in matchmaker.cpp that move an ad from one {quote:ClassAdList} to another *[4 hours]*.

*: The following methods will need some fixing at the callsites *[5 days]*:
*:: ExprTree::RArg() *DONE*
*:: ExprTree::LArg() *DONE*
*:: ExprTree::PrintToNewStr() *DONE*
*:: ExprTree::EvalTree()
*:: ClassAd(char*,char)
*:: ExprTree::PrintToStr() *DONE*
*:: ExprTree::MyType()
*:: ClassAd::ExchangeExpressions() *DONE*
*:: ClassAd::unchain() *DONE*
*:: ClassAd::RestoreChain() *DONE*
*:: AttrList::put()

{subsection: Post-Flag Day 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.