glite::jdl::JdlAttributeList Class Reference

#include <glite/jdl/JdlAttributeList.h>

Public Member Functions

 JdlAttributeList ()
virtual ~JdlAttributeList () throw ()
bool findBool (const std::string &attr_name)
bool findInt (const std::string &attr_name)
bool findString (const std::string &attr_name)
bool findDouble (const std::string &attr_name)
bool findAd (const std::string &attr_name)
bool findList (const std::string &attr_name)
bool findExpr (const std::string &attr_name)
bool findCheck (const std::string &attr_name)
bool findAttribute (const std::string &attr_name)
bool findAttr (const std::string &attr_name, std::vector< std::string > values) const
bool findTail (const std::string &attr_name, std::vector< std::string > values) const

Check Methods



enum  Attr {
  JOBTYPE_MPICH_REQ_RTE, JOBTYPE_MPICH_REQ_CPU, JOBTYPE_MPICH_RANK_FREE, REQ_DEFAULT,
  RANK_DEFAULT, MAX_ATTR
}
class JobAd
void checkInt (const std::string &attr_name, int attr_value)
void checkDouble (const std::string &attr_name, const double &attr_value)
void checkBool (const std::string &attr_name, const bool &attr_value)
void checkString (const std::string &attr_name, const std::string &attr_value)
void checkAd (const std::string &attr_name, classad::ClassAd *attr_value)
void checkExpr (const std::string &attr_name, const std::string &attr_value)
void setDefault (Attr attr_name, const std::string &attr_value)

Detailed Description

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


Member Enumeration Documentation

Defatul attribute list

Enumerator:
JOBTYPE_MPICH_REQ_RTE 
JOBTYPE_MPICH_REQ_CPU 
JOBTYPE_MPICH_RANK_FREE 
REQ_DEFAULT 
RANK_DEFAULT 
MAX_ATTR 

Constructor & Destructor Documentation

glite::jdl::JdlAttributeList::JdlAttributeList (  ) 
virtual glite::jdl::JdlAttributeList::~JdlAttributeList (  )  throw () [inline, virtual]

Member Function Documentation

void glite::jdl::JdlAttributeList::checkAd ( const std::string &  attr_name,
classad::ClassAd *  attr_value 
)

Check if the couple attribute/value is admitted

Parameters:
attr_name - the name of the attribute
attr_value - the value of the attribute
Exceptions:
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

Parameters:
attr_name - the name of the attribute
attr_value - the value of the attribute
Exceptions:
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

Parameters:
attr_name - the name of the attribute
attr_value - the value of the attribute
Exceptions:
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

Parameters:
attr_name - the name of the attribute
attr_value - the value of the attribute
Exceptions:
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

Parameters:
attr_name - the name of the attribute
attr_value - the value of the attribute
Exceptions:
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

Parameters:
attr_name - the name of the attribute
attr_value - the value of the attribute
Exceptions:
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

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

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

Parameters:
attr_name the name of the attribute to be found
values the set of values to be looked up to
Returns:
true if found, false otherwise

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

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise
bool glite::jdl::JdlAttributeList::findBool ( const std::string &  attr_name  )  [inline]

Find the specified attribute among boolean values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

References findAttr().

bool glite::jdl::JdlAttributeList::findCheck ( const std::string &  attr_name  )  [inline]

Find the specified attribute among to-be-checked values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

References findAttr().

bool glite::jdl::JdlAttributeList::findDouble ( const std::string &  attr_name  )  [inline]

Find the specified attribute among double values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

References findAttr().

bool glite::jdl::JdlAttributeList::findExpr ( const std::string &  attr_name  )  [inline]

Find the specified attribute among expression values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

References findAttr().

bool glite::jdl::JdlAttributeList::findInt ( const std::string &  attr_name  )  [inline]

Find the specified attribute among integer values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

References findAttr().

bool glite::jdl::JdlAttributeList::findList ( const std::string &  attr_name  )  [inline]

Find the specified attribute among list values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

References findAttr().

bool glite::jdl::JdlAttributeList::findString ( const std::string &  attr_name  )  [inline]

Find the specified attribute among string values

Parameters:
attr_name the name of the attribute to be found
Returns:
true if found, false otherwise

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

Parameters:
attr_name the name of the attribute to be found
values the set of values to be looked up to
Returns:
true if found, false otherwise
void glite::jdl::JdlAttributeList::setDefault ( Attr  attr_name,
const std::string &  attr_value 
)

Set the value for a default attribute

Parameters:
attr_name the attribute to be set
attr_value the string representation of the value to be set

Friends And Related Function Documentation

friend class JobAd [friend]

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

Generated on 9 Feb 2014 for jdl-api-cpp-3.4.3 by  doxygen 1.6.1