| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DayaBay::JobInfo Class Reference

Basic information about the job. More...

#include <JobInfo.h>

Collaboration diagram for DayaBay::JobInfo:

[legend]
List of all members.

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.
JobInfooperator= (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::JobIdjobId () 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 JobParametersparameters () 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.

Detailed Description

Basic information about the job.

Author:
dandwyer@caltech.edu created Mon Apr 11 03:33:03 2011

Definition at line 41 of file JobInfo.h.


Member Typedef Documentation

typedef std::map<std::string,std::string> DayaBay::JobInfo::JobParameters

Container for job key,value pairs.

Definition at line 46 of file JobInfo.h.


Constructor & Destructor Documentation

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]

Default Destructor.

Definition at line 59 of file JobInfo.h.

00059 {}


Member Function Documentation

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]

Retrieve const The unique ID number for this job.

Definition at line 158 of file JobInfo.h.

00159 {
00160   return m_jobId;
00161 }

void DayaBay::JobInfo::setJobId ( const DayaBay::JobId value  )  [inline]

Update The unique ID number for this job.

Definition at line 163 of file JobInfo.h.

00164 {
00165   m_jobId = value;
00166 }

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]

operator new

Definition at line 93 of file JobInfo.h.

00094     {
00095       return ( sizeof(JobInfo) == size ? 
00096                boost::singleton_pool<JobInfo, sizeof(JobInfo)>::malloc() :
00097                ::operator new(size) );
00098     }

static void* DayaBay::JobInfo::operator new ( size_t  size,
void *  pObj 
) [inline, static]

placement operator new it is needed by libstdc++ 3.2.3 (e.g.

in std::vector) it is not needed in libstdc++ >= 3.4

Definition at line 103 of file JobInfo.h.

00104     {
00105       return ::operator new (size,pObj);
00106     }

static void DayaBay::JobInfo::operator delete ( void *  p  )  [inline, static]

operator delete

Definition at line 109 of file JobInfo.h.

00110     {
00111       boost::singleton_pool<JobInfo, sizeof(JobInfo)>::is_from(p) ?
00112       boost::singleton_pool<JobInfo, sizeof(JobInfo)>::free(p) :
00113       ::operator delete(p);
00114     }

static void DayaBay::JobInfo::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 118 of file JobInfo.h.

00119     {
00120       ::operator delete (p, pObj);
00121     }


Member Data Documentation

DayaBay::JobId DayaBay::JobInfo::m_jobId [private]

The unique ID number for this job.

Definition at line 127 of file JobInfo.h.

JobParameters DayaBay::JobInfo::m_parameters [private]

List of key,value job parameters.

Definition at line 128 of file JobInfo.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:20:35 2011 for JobInfo by doxygen 1.4.7