jdl-api-cpp-3.4.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glite::jdl::NodeAd Class Reference

Provides a representation of the job description in the JDL language. More...

#include <glite/jdl/NodeAd.h>

Inheritance diagram for glite::jdl::NodeAd:
glite::jdl::JobAd glite::jdl::Ad

Public Member Functions

 NodeAd ()
 
 NodeAd (const std::string &jdl)
 
 NodeAd (const classad::ClassAd &classAd)
 
 NodeAd (const NodeAd &nodead)
 
void operator= (const NodeAd &nodead)
 
virtual ~NodeAd () throw ()
 
std::vector< classad::ExprTree * > getRemoteSandbox ()
 
std::vector< std::string > getStringValue (const std::string &attr_name)
 
void addUserTag (const std::string &attr_name, const std::string &attr_value)
 
void checkSyntax (const std::string &attr_name, classad::Value attr_value)
 
- Public Member Functions inherited from glite::jdl::JobAd
 JobAd ()
 
virtual ~JobAd () throw ()
 
 JobAd (const std::string &jdl_string)
 
 JobAd (const classad::ClassAd &classAd)
 
 JobAd (const JobAd &jobad)
 
void operator= (const JobAd &jobad)
 
void fromClassAd (const classad::ClassAd &classAd)
 
void fromJobAd (const JobAd &jobad)
 
std::string toSubmissionString ()
 
void toFile (const std::string &file_path)
 
void setLocalAccess (bool lookInto)
 
void setDefaultRank (const std::string &attr_value)
 
void setDefaultReq (const std::string &attr_value)
 
void setDefaultRank (classad::ExprTree *attr_value)
 
void setDefaultReq (classad::ExprTree *attr_value)
 
void setAllowedProtocols (const std::vector< std::string > &attr_value)
 
const std::vector< std::string > getAllowedProtocols ()
 
void setAttributeExpr (const std::string &attr_name, const std::string &attr_value)
 
void setAttributeExpr (const std::string &attr_name, ExprTree *attr_value)
 
Ad getAd (const std::string &attr_name)
 
std::string getString (const std::string &attr_name)
 
int getInt (const std::string &attr_name)
 
double getDouble (const std::string &attr_name)
 
bool getBool (const std::string &attr_name)
 
bool gettoBretrieved ()
 
ExtractedAdgetExtractedAd ()
 
virtual void checkSyntax (const std::string &attr_name, classad::ExprTree *attr_value)
 
void checkMultiAttribute (const std::vector< std::string > &multi)
 
classad::ExprTree * delAttribute (const std::string &attr_name)
 
void check (const bool &restore=true)
 
- Public Member Functions inherited from glite::jdl::Ad
 Ad ()
 
virtual ~Ad () throw ()
 
 Ad (const classad::ClassAd &classAd)
 
 Ad (const std::string &jdl_string)
 
 Ad (const Ad &jobad)
 
virtual void operator= (const Ad &jobad)
 
void fromString (const std::string &jdl_string, std::string jdl_file="")
 
void fromFile (const std::string &jdl_file)
 
void fromStream (std::istream &jdl_in)
 
virtual std::string toString ()
 
virtual std::string toString (const std::string &attr_name)
 
virtual std::string toLines ()
 
bool isSet ()
 
void clear ()
 
classad::ClassAd *const ad ()
 
bool hasAttribute (const std::string &attr_name)
 
void remAttribute (const std::string &attr_name)
 
virtual classad::ExprTree * lookUp (const std::string &attr_name)
 
bool hasAttribute (const std::string &attr_name, const std::string &attr_value)
 
std::vector< std::string > attributes ()
 
void merge (Ad source, bool overwrite=true)
 
bool hasWarnings ()
 
std::vector< std::string > getWarnings ()
 
void addWarning (const std::string &msg)
 
int getType (const std::string &attr_name)
 
void addAttribute (const std::string &attr_name, int attr_value)
 
void addAttribute (const std::string &attr_name, double attr_value)
 
void addAttribute (const std::string &attr_name, bool attr_value)
 
void addAttribute (const std::string &attr_name, const std::string &attr_value)
 
void addAttribute (const std::string &attr_name, const char *attr_value)
 
void addAttribute (const std::string &attr_name, Ad *attr_value)
 
virtual void setAttribute (const std::string &attr_name, int attr_value)
 
virtual void setAttribute (const std::string &attr_name, const std::string &attr_value)
 
virtual void setAttribute (const std::string &attr_name, const char *attr_value)
 
virtual void setAttribute (const std::string &attr_name, double attr_value)
 
virtual void setAttribute (const std::string &attr_name, bool attr_value)
 
virtual void setAttribute (const std::string &attr_name, Ad *attr_value)
 
virtual void setAttributeExpr (const std::string &attr_name, classad::ExprTree *attr_value)
 
virtual std::string getAttributeExpr (const std::string &attr_name)
 
std::vector< int > getIntValue (const std::string &attr_name)
 
std::vector< double > getDoubleValue (const std::string &attr_name)
 
std::vector< bool > getBoolValue (const std::string &attr_name)
 
std::vector< std::vector
< std::string > > 
getStringList (const std::string &attr_name)
 

Protected Member Functions

std::vector< std::string > getISBStrings ()
 
void checkInputSandbox (std::vector< std::string > &extracted)
 
void checkSpecials ()
 
void insertAttribute (const std::string &attr_name, classad::ExprTree *val)
 
- Protected Member Functions inherited from glite::jdl::JobAd
virtual void checkRankReq ()
 
- Protected Member Functions inherited from glite::jdl::Ad
virtual void addAttribute (std::string attr_name, classad::Value val)
 
virtual void appendValue (classad::ExprTree *tree, const classad::Value &val, const std::string &attr_name)
 
virtual void insertAttribute (const std::string &attr_name, classad::Value val)
 
virtual classad::Value getTypeValue (const std::string &attr_name)
 
bool hasAttribute (classad::ExprTree *tree, const std::string &attr_value)
 

Friends

class ExpDagAd
 

Additional Inherited Members

- Public Types inherited from glite::jdl::Ad
enum  {
  TYPE_UNKNOWN = classad::Value::ERROR_VALUE, TYPE_INTEGER =classad::Value::INTEGER_VALUE, TYPE_BOOLEAN =classad::Value::BOOLEAN_VALUE, TYPE_STRING =classad::Value::STRING_VALUE,
  TYPE_REAL =classad::Value::REAL_VALUE, TYPE_CLASSAD =classad::Value::CLASSAD_VALUE, TYPE_EXPRESSION =classad::Value::UNDEFINED_VALUE
}
 
- Protected Attributes inherited from glite::jdl::JobAd
classad::ClassAd user
 
checkType lookInto_b
 
bool checking
 
bool toBretrieved
 
boost::scoped_ptr< ExtractedAdextractedAd
 
- Protected Attributes inherited from glite::jdl::Ad
std::vector< std::string > warning_messages_v
 

Detailed Description

Provides a representation of the job description in the JDL language.

Version
0.1
Date
15 April 2002
Author
Alessandro Maraschini aless.nosp@m.andr.nosp@m.o.mar.nosp@m.asch.nosp@m.ini@d.nosp@m.atam.nosp@m.at.it

Constructor & Destructor Documentation

glite::jdl::NodeAd::NodeAd ( )
inline

Default constructor

glite::jdl::NodeAd::NodeAd ( const std::string &  jdl)
inline

Constructor with a string

Parameters
jdlthe string to be loaded

References glite::jdl::Ad::fromString().

glite::jdl::NodeAd::NodeAd ( const classad::ClassAd &  classAd)
inline

Constructory by Classad

References glite::jdl::JobAd::fromClassAd().

glite::jdl::NodeAd::NodeAd ( const NodeAd nodead)

Constructory by NodeAd

virtual glite::jdl::NodeAd::~NodeAd ( )
throw (
)
virtual

Operator =

Member Function Documentation

void glite::jdl::NodeAd::addUserTag ( const std::string &  attr_name,
const std::string &  attr_value 
)

Add a UserTag to the node

Parameters
attr_namethe name of the usertag to be added
attr_valuethe value for the usertag
void glite::jdl::NodeAd::checkInputSandbox ( std::vector< std::string > &  extracted)
protectedvirtual

Check InputSandbox value. Could be overloaded in order to perform different checks

Parameters
extracteda vector listing all the files that have to be extracted i.e. whoose path has to be solved

Reimplemented from glite::jdl::JobAd.

void glite::jdl::NodeAd::checkSpecials ( )
protectedvirtual

Perform Special checks for VirtualOrganisation attribute Notice: for a NodeAd instance it is not mandatory (as for a JobAd)

Reimplemented from glite::jdl::JobAd.

void glite::jdl::NodeAd::checkSyntax ( const std::string &  attr_name,
classad::Value  attr_value 
)
virtual

Check the syntax of the specified attribute

Parameters
attr_namethe name of the attribute
attr_valuethe classad value of the attribute

Reimplemented from glite::jdl::JobAd.

std::vector<std::string> glite::jdl::NodeAd::getISBStrings ( )
protected

Retrieves only string InputSandbox values for this node. reference values will not be taken into consideration

Returns
the list of all string values
std::vector<classad::ExprTree*> glite::jdl::NodeAd::getRemoteSandbox ( )

Retrieve the inputSandbox remote files extracted while checking the Ad

Returns
a vector of all the Expression of remote sandbox i.e. all the <node name>_<sbx file> linked in the inputsandbox attribute
std::vector<std::string> glite::jdl::NodeAd::getStringValue ( const std::string &  attr_name)
virtual

Retrieves the string value for the specified attribute

Parameters
attr_namethe name of the attribute to be looked up
Returns
the values, as a vector of strings, corresponding to the searched attribute

Reimplemented from glite::jdl::Ad.

void glite::jdl::NodeAd::insertAttribute ( const std::string &  attr_name,
classad::ExprTree *  val 
)
protectedvirtual

JobAd overloaded method: used to insert an attribute inside the classad

Parameters
attr_namethe name of the attribute
valthe value of the inserted attribute as a classad expression

Reimplemented from glite::jdl::JobAd.

void glite::jdl::NodeAd::operator= ( const NodeAd nodead)

Operator "=" performs a deep copy of the JobAd instance

Friends And Related Function Documentation

friend class ExpDagAd
friend

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