JobAd Manipulation attribute class This class allow the user to know the names of all Jobad attributes and it is used principally by JobAd in order to perform the requested checks needed ro prepare for submission. More...
#include <src/requestad/JdlAttributeList.h>
Public Member Functions | |
JdlAttributeList () | |
virtual | ~JdlAttributeList () throw () |
bool | findBool (const std::string &attr_name) |
Find the specified attribute among boolean values. | |
bool | findInt (const std::string &attr_name) |
Find the specified attribute among integer values. | |
bool | findString (const std::string &attr_name) |
Find the specified attribute among string values. | |
bool | findDouble (const std::string &attr_name) |
Find the specified attribute among double values. | |
bool | findAd (const std::string &attr_name) |
Find the specified attribute among Ad values. | |
bool | findList (const std::string &attr_name) |
Find the specified attribute among list values. | |
bool | findExpr (const std::string &attr_name) |
Find the specified attribute among expression values. | |
bool | findCheck (const std::string &attr_name) |
Find the specified attribute among to-be-checked values. | |
bool | findAttribute (const std::string &attr_name) |
Find the specified attribute among all known values. | |
bool | findAttr (const std::string &attr_name, std::vector< std::string > values) const |
Find the specified attribute among all known values. | |
bool | findTail (const std::string &attr_name, std::vector< std::string > values) const |
Find the specified attribute among the provided list. | |
Check Methods | |
| |
enum | Attr { JOBTYPE_MPICH_REQ_RTE, JOBTYPE_MPICH_REQ_CPU, JOBTYPE_MPICH_RANK_FREE, REQ_DEFAULT, RANK_DEFAULT, MAX_ATTR } |
Defatul attribute list. More... | |
class | JobAd |
void | checkInt (const std::string &attr_name, int attr_value) |
Check if the couple attribute/value is admitted. | |
void | checkDouble (const std::string &attr_name, const double &attr_value) |
Check if the couple attribute/value is admitted. | |
void | checkBool (const std::string &attr_name, const bool &attr_value) |
Check if the couple attribute/value is admitted. | |
void | checkString (const std::string &attr_name, const std::string &attr_value) |
Check if the couple attribute/value is admitted. | |
void | checkAd (const std::string &attr_name, classad::ClassAd *attr_value) |
Check if the couple attribute/value is admitted. | |
void | checkExpr (const std::string &attr_name, const std::string &attr_value) |
Check if the couple attribute/value is admitted. | |
void | setDefault (Attr attr_name, const std::string &attr_value) |
Set the value for a default attribute. |
JobAd Manipulation attribute class This class allow the user to know the names of all Jobad attributes and it is used principally by JobAd in order to perform the requested checks needed ro prepare for submission.
glite::jdl::JdlAttributeList::JdlAttributeList | ( | ) |
virtual glite::jdl::JdlAttributeList::~JdlAttributeList | ( | ) | throw () [inline, virtual] |
void glite::jdl::JdlAttributeList::checkAd | ( | const std::string & | attr_name, | |
classad::ClassAd * | attr_value | |||
) |
Check if the couple attribute/value is admitted.
attr_name | - the name of the attribute | |
attr_value | - the value of the attribute |
AdMismatchException | - The type of value is not allowed for the specified attribute name |
void glite::jdl::JdlAttributeList::checkBool | ( | const std::string & | attr_name, | |
const bool & | attr_value | |||
) |
Check if the couple attribute/value is admitted.
attr_name | - the name of the attribute | |
attr_value | - the value of the attribute |
AdMismatchException | - The type of value is not allowed for the specified attribute name |
void glite::jdl::JdlAttributeList::checkDouble | ( | const std::string & | attr_name, | |
const double & | attr_value | |||
) |
Check if the couple attribute/value is admitted.
attr_name | - the name of the attribute | |
attr_value | - the value of the attribute |
AdMismatchException | - The type of value is not allowed for the specified attribute name |
void glite::jdl::JdlAttributeList::checkExpr | ( | const std::string & | attr_name, | |
const std::string & | attr_value | |||
) |
Check if the couple attribute/value is admitted.
attr_name | - the name of the attribute | |
attr_value | - the value of the attribute |
AdMismatchException | - The type of value is not allowed for the specified attribute name | |
AdFormatException | - The type of value is not allowed for the specified attribute name |
void glite::jdl::JdlAttributeList::checkInt | ( | const std::string & | attr_name, | |
int | attr_value | |||
) |
Check if the couple attribute/value is admitted.
attr_name | - the name of the attribute | |
attr_value | - the value of the attribute |
AdMismatchException | - The type of value is not allowed for the specified attribute name |
void glite::jdl::JdlAttributeList::checkString | ( | const std::string & | attr_name, | |
const std::string & | attr_value | |||
) |
Check if the couple attribute/value is admitted.
attr_name | - the name of the attribute | |
attr_value | - the value of the attribute |
AdMismatchException | - The type of value is not allowed for the specified attribute name |
bool glite::jdl::JdlAttributeList::findAd | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among Ad values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findAttr | ( | const std::string & | attr_name, | |
std::vector< std::string > | values | |||
) | const |
Find the specified attribute among all known values.
Case INSENSITIVE
attr_name | the name of the attribute to be found | |
values | the set of values to be looked up to |
Referenced by findAd(), findBool(), findCheck(), findDouble(), findExpr(), findInt(), findList(), and findString().
bool glite::jdl::JdlAttributeList::findAttribute | ( | const std::string & | attr_name | ) |
Find the specified attribute among all known values.
attr_name | the name of the attribute to be found |
bool glite::jdl::JdlAttributeList::findBool | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among boolean values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findCheck | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among to-be-checked values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findDouble | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among double values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findExpr | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among expression values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findInt | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among integer values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findList | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among list values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findString | ( | const std::string & | attr_name | ) | [inline] |
Find the specified attribute among string values.
attr_name | the name of the attribute to be found |
References findAttr().
bool glite::jdl::JdlAttributeList::findTail | ( | const std::string & | attr_name, | |
std::vector< std::string > | values | |||
) | const |
Find the specified attribute among the provided list.
case SENSITIVE, attr_name can be just the tail of the value
attr_name | the name of the attribute to be found | |
values | the set of values to be looked up to |
void glite::jdl::JdlAttributeList::setDefault | ( | Attr | attr_name, | |
const std::string & | attr_value | |||
) |
Set the value for a default attribute.
attr_name | the attribute to be set | |
attr_value | the string representation of the value to be set |
friend class JobAd [friend] |