classad.h   classad.h 
skipping to change at line 29 skipping to change at line 29
#ifndef __CLASSAD_H__ #ifndef __CLASSAD_H__
#define __CLASSAD_H__ #define __CLASSAD_H__
#include <set> #include <set>
#include <map> #include <map>
#include <vector> #include <vector>
#include "classad/classad_stl.h" #include "classad/classad_stl.h"
#include "classad/exprTree.h" #include "classad/exprTree.h"
#ifdef CLASSAD_DEPRECATED
class Stream;
#endif
BEGIN_NAMESPACE( classad ) BEGIN_NAMESPACE( classad )
typedef std::set<std::string, CaseIgnLTStr> References; typedef std::set<std::string, CaseIgnLTStr> References;
typedef std::map<const ClassAd*, References> PortReferences; typedef std::map<const ClassAd*, References> PortReferences;
#if defined( EXPERIMENTAL ) #if defined( EXPERIMENTAL )
#include "classad/rectangle.h" #include "classad/rectangle.h"
#endif #endif
typedef classad_hash_map<std::string, ExprTree*, CaseIgnLTStr> AttrList; typedef classad_hash_map<std::string, ExprTree*, CaseIgnLTStr> AttrList;
skipping to change at line 554 skipping to change at line 550
/** Return a list of attribute references in the expression that ar e not /** Return a list of attribute references in the expression that ar e not
* contained within this ClassAd. * contained within this ClassAd.
* @param tree The ExprTree for the expression that has references that you are * @param tree The ExprTree for the expression that has references that you are
* wish to know about. * wish to know about.
* @param refs The list of references * @param refs The list of references
* @return true on success, false on failure. * @return true on success, false on failure.
*/ */
bool GetExternalReferences(const ExprTree *tree, PortReferen ces &refs); bool GetExternalReferences(const ExprTree *tree, PortReferen ces &refs);
//@} //@}
/** Return a list of attribute references in the expression that ar
e
* contained within this ClassAd.
* @param tree The ExprTree for the expression that has references
* that you wish to know about.
* @param refs The list of references
* @param fullNames true if you want full names (like other.foo)
* @return true on success, false on failure.
*/
bool GetInternalReferences( const ExprTree *tree, References &refs,
bool fullNames);
#if defined( EXPERIMENTAL ) #if defined( EXPERIMENTAL )
bool AddRectangle( const ExprTree *tree, Rectangles &r, bool AddRectangle( const ExprTree *tree, Rectangles &r,
const std::string &allowed, const Re ferences &imported ); const std::string &allowed, const Re ferences &imported );
#endif #endif
#if defined( CLASSAD_DEPRECATED )
/**@name Deprecated functions (only for use within Condor) *
/
//@{
/** Insert an attribute/value into the ClassAd
* @param str A string of the form "Attribute = Value"
*/
int Insert(const char *str);
/** Insert an attribute/value into the ClassAd
* @param expr A string of the form "Attribute = Value"
*/
int InsertOrUpdate(const char *expr) { r
eturn Insert(expr); }
// for iteration through expressions
// void ResetExpr();
// ExprTree* NextExpr();
// for iteration through names (i.e., lhs of the expressions
)
// void ResetName() { this->ptrName = exprList; }
// const char* NextNameOriginal();
// lookup values in classads (for simple assignments)
// ExprTree* Lookup(char *) const; // for conve
nience
// ExprTree* Lookup(const char*) const; // look up an expres
sion
/** Lookup (don't evaluate) an attribute that is a string.
* @param name The attribute
* @param value The string, copied with strcpy (DANGER)
* @return true if the attribute exists and is a string, false oth
erwise
*/
int LookupString(const char *name, char *value) cons
t;
/** Lookup (don't evaluate) an attribute that is a string.
* @param name The attribute
* @param value The string, copied with strncpy
* @param max_len The maximum number of bytes in the string to cop
y
* @return true if the attribute exists and is a string, false oth
erwise
*/
int LookupString(const char *name, char *value, int
max_len) const;
/** Lookup (don't evaluate) an attribute that is a string.
* @param name The attribute
* @param value The string, allocated with malloc() not new.
* @return true if the attribute exists and is a string, false oth
erwise
*/
int LookupString (const char *name, char **value) co
nst;
/** Lookup (don't evaluate) an attribute that is an integer.
* @param name The attribute
* @param value The integer
* @return true if the attribute exists and is an integer, false o
therwise
*/
int LookupInteger(const char *name, int &value) const;
/** Lookup (don't evaluate) an attribute that is a float.
* @param name The attribute
* @param value The integer
* @return true if the attribute exists and is a float, false othe
rwise
*/
int LookupFloat(const char *name, float &value) const;
/** Lookup (don't evaluate) an attribute that can be considered a b
oolean
* @param name The attribute
* @param value 0 if the attribute is 0, 1 otherwise
* @return true if the attribute exists and is a boolean/integer,
false otherwise
*/
int LookupBool(const char *name, int &value) const;
/** Lookup (don't evaluate) an attribute that can be considered a b
oolean
* @param name The attribute
* @param value false if the attribute is 0, true otherwise
* @return true if the attribute exists and is a boolean/integer,
false otherwise
*/
int LookupBool(const char *name, bool &value) const;
/** Lookup and evaluate an attribute in the ClassAd that is
a string
* @param name The name of the attribute
* @param target A ClassAd to resolve MY or other references
* @param value Where we the copy the string. Danger: we just use
strcpy.
* @return 1 on success, 0 if the attribute doesn't exist, or if i
t does exist
* but is not a string.
*/
int EvalString (const char *name, class ClassAd *tar
get, char *value);
/** Lookup and evaluate an attribute in the ClassAd that is
an integer
* @param name The name of the attribute
* @param target A ClassAd to resolve MY or other references
* @param value Where we the copy the value.
* @return 1 on success, 0 if the attribute doesn't exist, or if i
t does exist
* but is not an integer
*/
int EvalInteger (const char *name, class ClassAd *ta
rget, int &value);
/** Lookup and evaluate an attribute in the ClassAd that is
a float
* @param name The name of the attribute
* @param target A ClassAd to resolve MY or other references
* @param value Where we the copy the value. Danger: we just use s
trcpy.
* @return 1 on success, 0 if the attribute doesn't exist, or if i
t does exist
* but is not a float.
*/
int EvalFloat (const char *name, class ClassAd *targ
et, float &value);
/** Lookup and evaluate an attribute in the ClassAd that is
a boolean
* @param name The name of the attribute
* @param target A ClassAd to resolve MY or other references
* @param value Where we a 1 (if the value is non-zero) or a 1.
* @return 1 on success, 0 if the attribute doesn't exist, or if i
t does exist
* but is not a number.
*/
int EvalBool (const char *name, class ClassAd *targ
et, int &value);
/** A constructor that reads old ClassAds from a FILE */
ClassAd(FILE*,char*,int&,int&,int&); // Constructor, read from fi
le.
/** Set the MyType attribute */
void SetMyTypeName(const char *);
/** Get the value of the MyType attribute */
const char* GetMyTypeName();
/** Set the value of the TargetType attribute */
void SetTargetTypeName(const char *);
/** Get the value of the TargetType attribtute */
const char* GetTargetTypeName();
/** Print the ClassAd as an old ClassAd to the stream
* @param s the stream
*/
int put(Stream& s);
/** Read the old ClassAd from the stream, and fill in this ClassAd.
* @param s the stream
*/
int initFromStream(Stream& s);
/** Print the ClassAd as an old ClassAd to the FILE
@param file The file handle to print to.
@return TRUE
*/
int fPrint(FILE *file);
/** Print the ClassAd as an old ClasAd with dprintf
@param level The dprintf level.
*/
void dPrint( int level);
bool AddExplicitConditionals( ExprTree *expr, ExprTree *&new
Expr );
ClassAd *AddExplicitTargetRefs( );
//@}
#endif
/**@name Chaining functions */ /**@name Chaining functions */
//@{ //@{
/** Chain this ad to the parent ad. /** Chain this ad to the parent ad.
* After chaining, any attribute we look for that is not * After chaining, any attribute we look for that is not
* in this ad will be looked for in the parent ad. This is * 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 * a simple form of compression: many ads can be linked to a
* parent ad that contains common attributes between the ads. * parent ad that contains common attributes between the ads.
* If an attribute is in both this ad and the parent, a lookup * 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 t o * will only show it in the parent. If we make any modifications t o
* this ad, it will not affect the parent. * this ad, it will not affect the parent.
skipping to change at line 783 skipping to change at line 650
friend class AttributeReference; friend class AttributeReference;
friend class ExprTree; friend class ExprTree;
friend class EvalState; friend class EvalState;
friend class ClassAdIterator; friend class ClassAdIterator;
bool _GetExternalReferences( const ExprTree *, ClassAd *, bool _GetExternalReferences( const ExprTree *, ClassAd *,
EvalState &, References&, bool fullN ames ); EvalState &, References&, bool fullN ames );
bool _GetExternalReferences( const ExprTree *, ClassAd *, bool _GetExternalReferences( const ExprTree *, ClassAd *,
EvalState &, PortReferences& ); EvalState &, PortReferences& );
bool _GetInternalReferences(const ExprTree *expr, ClassAd *ad,
EvalState &state, References& refs, bool fullNames);
#if defined( EXPERIMENTAL ) #if defined( EXPERIMENTAL )
bool _MakeRectangles(const ExprTree*,const std::string&,Rect angles&, bool); bool _MakeRectangles(const ExprTree*,const std::string&,Rect angles&, bool);
bool _CheckRef( ExprTree *, const std::string & ); bool _CheckRef( ExprTree *, const std::string & );
#endif #endif
#if defined( CLASSAD_DEPRECATED )
void evalFromEnvironment( const char *name, Value val );
ExprTree *AddExplicitConditionals( ExprTree * );
ExprTree *AddExplicitTargetRefs( ExprTree *,
std::set < std::string, CaseIgnLTStr > & );
#endif
ClassAd *_GetDeepScope( const std::string& ) const; ClassAd *_GetDeepScope( const std::string& ) const;
ClassAd *_GetDeepScope( ExprTree * ) const; ClassAd *_GetDeepScope( ExprTree * ) const;
virtual void _SetParentScope( const ClassAd* p ); virtual void _SetParentScope( const ClassAd* p );
virtual bool _Evaluate( EvalState& , Value& ) const; virtual bool _Evaluate( EvalState& , Value& ) const;
virtual bool _Evaluate( EvalState&, Value&, ExprTree*& ) con st; virtual bool _Evaluate( EvalState&, Value&, ExprTree*& ) con st;
virtual bool _Flatten( EvalState&, Value&, ExprTree*&, int* ) const; virtual bool _Flatten( EvalState&, Value&, ExprTree*&, int* ) const;
int LookupInScope( const std::string&, ExprTree*&, EvalState & ) const; int LookupInScope( const std::string&, ExprTree*&, EvalState & ) const;
AttrList attrList; AttrList attrList;
 End of changes. 5 change blocks. 
184 lines changed or deleted 15 lines changed or added


 fnCall.h   fnCall.h 
skipping to change at line 154 skipping to change at line 154
// time management (constructors) // time management (constructors)
static bool epochTime (const char *, const ArgumentList &argList, static bool epochTime (const char *, const ArgumentList &argList,
EvalState &, Value &val); EvalState &, Value &val);
static bool currentTime(const char*,const ArgumentList&,EvalState&, static bool currentTime(const char*,const ArgumentList&,EvalState&,
Value&); Value&);
static bool timeZoneOffset(const char*,const ArgumentList&,EvalState &, static bool timeZoneOffset(const char*,const ArgumentList&,EvalState &,
Value&); Value&);
static bool dayTime(const char*,const ArgumentList&,EvalState&,Value &); static bool dayTime(const char*,const ArgumentList&,EvalState&,Value &);
static bool makeTime(const char*,const ArgumentList&,EvalState&,Valu e&); static bool makeTime(const char*,const ArgumentList&,EvalState&,Valu e&);
/* Unused
static bool makeDate(const char*,const ArgumentList&,EvalState&,Valu e&); static bool makeDate(const char*,const ArgumentList&,EvalState&,Valu e&);
*/
// time management (selectors) // time management (selectors)
static bool getField(const char*,const ArgumentList&,EvalState&,Valu e&); static bool getField(const char*,const ArgumentList&,EvalState&,Valu e&);
static bool splitTime(const char*,const ArgumentList&,EvalState&,Val ue&); static bool splitTime(const char*,const ArgumentList&,EvalState&,Val ue&);
static bool formatTime(const char*,const ArgumentList&,EvalState&,Value &); static bool formatTime(const char*,const ArgumentList&,EvalState&,Value &);
// time management (conversions) // time management (conversions)
/* Unused
static bool inTimeUnits(const char*,const ArgumentList&,EvalState&, static bool inTimeUnits(const char*,const ArgumentList&,EvalState&,
Value&); Value&);
*/
// string management // string management
static bool strCat(const char*,const ArgumentList&,EvalState&,Value& ); static bool strCat(const char*,const ArgumentList&,EvalState&,Value& );
static bool changeCase(const char*,const ArgumentList&,EvalState&, static bool changeCase(const char*,const ArgumentList&,EvalState&,
Value&); Value&);
static bool subString(const char*,const ArgumentList&,EvalState&, static bool subString(const char*,const ArgumentList&,EvalState&,
Value&); Value&);
static bool compareString(const char*,const ArgumentList&,EvalState& , static bool compareString(const char*,const ArgumentList&,EvalState& ,
Value&); Value&);
skipping to change at line 197 skipping to change at line 201
static bool convTime(const char*,const ArgumentList&,EvalState&,Valu e&); static bool convTime(const char*,const ArgumentList&,EvalState&,Valu e&);
// math (floor, ceil, round) // math (floor, ceil, round)
static bool doMath(const char*,const ArgumentList&,EvalState&,Value& ); static bool doMath(const char*,const ArgumentList&,EvalState&,Value& );
static bool random(const char*,const ArgumentList&,EvalState&,Value& ); static bool random(const char*,const ArgumentList&,EvalState&,Value& );
static bool ifThenElse( const char* name,const ArgumentList &argList ,EvalState &state,Value &result ); static bool ifThenElse( const char* name,const ArgumentList &argList ,EvalState &state,Value &result );
static bool interval( const char* name,const ArgumentList &argList,E valState &state,Value &result ); static bool interval( const char* name,const ArgumentList &argList,E valState &state,Value &result );
static bool eval( const char* name,const ArgumentList &argList,EvalS
tate &state,Value &result );
//static bool doReal(const char*,const ArgumentList&,EvalState&,Valu e&); //static bool doReal(const char*,const ArgumentList&,EvalState&,Valu e&);
}; };
END_NAMESPACE // classad END_NAMESPACE // classad
#endif//__FN_CALL_H__ #endif//__FN_CALL_H__
 End of changes. 5 change blocks. 
0 lines changed or deleted 7 lines changed or added


 util.h   util.h 
skipping to change at line 42 skipping to change at line 42
{ {
time_t secs; // seconds from the epoch (UTC) time_t secs; // seconds from the epoch (UTC)
int offset; // seconds east of Greenwich int offset; // seconds east of Greenwich
}; };
// Get a random number between 0 and something large--usually an int // Get a random number between 0 and something large--usually an int
int get_random_integer(void); int get_random_integer(void);
// Get a random number between 0 and 1 // Get a random number between 0 and 1
double get_random_real(void); double get_random_real(void);
long timezone_offset(void); /* This calculates the timezone offset of the given time for the current
* locality. The returned value is the offset in seconds east of UTC.
* If the optional no_dst parameter is set to true, the calculation is
* made assuming no daylight saving time.
*/
long timezone_offset( time_t clock, bool no_dst = false );
/* This converts a string so that sequences like \t /* This converts a string so that sequences like \t
* (two-characters, slash and t) are converted into the * (two-characters, slash and t) are converted into the
* correct characters like tab. It also converts octal sequences. * correct characters like tab. It also converts octal sequences.
*/ */
void convert_escapes(std::string &text, bool &validStr); void convert_escapes(std::string &text, bool &validStr);
void getLocalTime(time_t *now, struct tm *localtm); void getLocalTime(time_t *now, struct tm *localtm);
void getGMTime(time_t *now, struct tm *localtm); void getGMTime(time_t *now, struct tm *localtm);
 End of changes. 1 change blocks. 
1 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/