glite::jdl::JdlAttributeList Class Reference

#include <glite/jdl/JdlAttributeList.h>


Check Methods

enum  Attr {
  JOBTYPE_MPICH_REQ_RTE, JOBTYPE_MPICH_REQ_CPU, JOBTYPE_MPICH_RANK_FREE, REQ_DEFAULT,
  RANK_DEFAULT, MAX_ATTR
}
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)
class JobAd

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


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

enum glite::jdl::JdlAttributeList::Attr

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

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

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

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

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

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

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

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

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

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 2 Jul 2013 for jdl-api-cpp-3.4.2 by  doxygen 1.4.7