#include <JobInfo.h>
Collaboration diagram for DayaBay::JobInfo:
Public Types | |
typedef std::map< std::string, std::string > | JobParameters |
Container for job key,value pairs. | |
Public Member Functions | |
JobInfo () | |
Default Constructor. | |
JobInfo (const JobInfo &rh) | |
Copy Constructor. | |
JobInfo & | operator= (const JobInfo &rh) |
Assignment operator. | |
virtual | ~JobInfo () |
Default Destructor. | |
bool | exists (const std::string &name) const |
Return true if the parameter has a value. | |
std::string | get (const std::string &name) const |
Return the parameter value. | |
void | set (const std::string &name, const std::string &value) |
Set the parameter name/value. | |
std::ostream & | fillStream (std::ostream &s) const |
Print the job information. | |
const DayaBay::JobId & | jobId () const |
Retrieve const The unique ID number for this job. | |
void | setJobId (const DayaBay::JobId &value) |
Update The unique ID number for this job. | |
const JobParameters & | parameters () const |
Retrieve const List of key,value job parameters. | |
void | setParameters (const JobParameters &value) |
Update List of key,value job parameters. | |
Static Public Member Functions | |
static void * | operator new (size_t size) |
operator new | |
static void * | operator new (size_t size, void *pObj) |
placement operator new it is needed by libstdc++ 3.2.3 (e.g. | |
static void | operator delete (void *p) |
operator delete | |
static void | operator delete (void *p, void *pObj) |
placement operator delete not sure if really needed, but it does not harm | |
Private Attributes | |
DayaBay::JobId | m_jobId |
The unique ID number for this job. | |
JobParameters | m_parameters |
List of key,value job parameters. |
Definition at line 41 of file JobInfo.h.
typedef std::map<std::string,std::string> DayaBay::JobInfo::JobParameters |
DayaBay::JobInfo::JobInfo | ( | ) | [inline] |
Default Constructor.
Definition at line 49 of file JobInfo.h.
00049 : m_jobId(), 00050 m_parameters() {}
DayaBay::JobInfo::JobInfo | ( | const JobInfo & | rh | ) | [inline] |
Copy Constructor.
Definition at line 145 of file JobInfo.h.
00145 : 00146 m_jobId( rh.m_jobId ), 00147 m_parameters( rh.m_parameters ) 00148 {}
virtual DayaBay::JobInfo::~JobInfo | ( | ) | [inline, virtual] |
DayaBay::JobInfo & DayaBay::JobInfo::operator= | ( | const JobInfo & | rh | ) | [inline] |
Assignment operator.
Definition at line 150 of file JobInfo.h.
00150 { 00151 if ( this != &rh ) { 00152 m_jobId = rh.m_jobId; 00153 m_parameters = rh.m_parameters; 00154 } 00155 return *this; 00156 }
bool DayaBay::JobInfo::exists | ( | const std::string & | name | ) | const [inline] |
Return true if the parameter has a value.
Definition at line 178 of file JobInfo.h.
00179 { 00180 00181 DayaBay::JobInfo::JobParameters::const_iterator pIter = m_parameters.find(name); 00182 if(pIter != m_parameters.end()){ 00183 return true; 00184 } 00185 return false; 00186 00187 }
std::string DayaBay::JobInfo::get | ( | const std::string & | name | ) | const [inline] |
Return the parameter value.
Definition at line 189 of file JobInfo.h.
00190 { 00191 00192 DayaBay::JobInfo::JobParameters::const_iterator pIter = m_parameters.find(name); 00193 if(pIter != m_parameters.end()){ 00194 return pIter->second; 00195 } 00196 return std::string(); 00197 00198 }
void DayaBay::JobInfo::set | ( | const std::string & | name, | |
const std::string & | value | |||
) | [inline] |
Set the parameter name/value.
Definition at line 200 of file JobInfo.h.
00202 { 00203 00204 m_parameters[name]=value; 00205 00206 }
std::ostream & DayaBay::JobInfo::fillStream | ( | std::ostream & | s | ) | const |
Print the job information.
Definition at line 3 of file JobInfo.cc.
00004 { 00005 s << "{ " 00006 << " jobId : " << m_jobId.uuid() << std::endl; 00007 00008 DayaBay::JobInfo::JobParameters::const_iterator it, done 00009 = m_parameters.end(); 00010 for (it=m_parameters.begin(); it != done; ++it) { 00011 s << " " << it->first << " : " << it->second << std::endl; 00012 } 00013 s << "}"; 00014 return s; 00015 }
const DayaBay::JobId & DayaBay::JobInfo::jobId | ( | ) | const [inline] |
void DayaBay::JobInfo::setJobId | ( | const DayaBay::JobId & | value | ) | [inline] |
const DayaBay::JobInfo::JobParameters & DayaBay::JobInfo::parameters | ( | ) | const [inline] |
Retrieve const List of key,value job parameters.
Definition at line 168 of file JobInfo.h.
00169 { 00170 return m_parameters; 00171 }
void DayaBay::JobInfo::setParameters | ( | const JobParameters & | value | ) | [inline] |
Update List of key,value job parameters.
Definition at line 173 of file JobInfo.h.
00174 { 00175 m_parameters = value; 00176 }
static void* DayaBay::JobInfo::operator new | ( | size_t | size | ) | [inline, static] |
static void* DayaBay::JobInfo::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
static void DayaBay::JobInfo::operator delete | ( | void * | p | ) | [inline, static] |
static void DayaBay::JobInfo::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
DayaBay::JobId DayaBay::JobInfo::m_jobId [private] |
JobParameters DayaBay::JobInfo::m_parameters [private] |