All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
CheckPhotonLibraryJobs.JobIDclass Class Reference

Classes

class  InvalidJobID
 

Public Member Functions

def __init__
 
def parse
 
def jobNo
 
def subjobIndex
 
def server
 
def subjobID
 
def jobID
 
def subjobTag
 
def __str__
 
def __repr__
 

Static Public Attributes

tuple JobIDpattern = re.compile(r'^([0-9]+)\.([0-9]+)@(.*)$')
 

Private Attributes

 _jobNo
 
 _subjobIndex
 
 _server
 

Detailed Description

Class parsing a job ID.

Definition at line 57 of file CheckPhotonLibraryJobs.py.

Constructor & Destructor Documentation

def CheckPhotonLibraryJobs.JobIDclass.__init__ (   self,
  jobIDstring 
)

Definition at line 64 of file CheckPhotonLibraryJobs.py.

64 
65  def __init__(self, jobIDstring): self.parse(jobIDstring)

Member Function Documentation

def CheckPhotonLibraryJobs.JobIDclass.__repr__ (   self)

Definition at line 83 of file CheckPhotonLibraryJobs.py.

83 
84  def __repr__(self): return "%s(%r)" % (self.__class__.__name__, self.jobID())
85 
86 # class JobIDclass
87 
def CheckPhotonLibraryJobs.JobIDclass.__str__ (   self)

Definition at line 82 of file CheckPhotonLibraryJobs.py.

82 
def __str__(self): return self.jobID()
def CheckPhotonLibraryJobs.JobIDclass.jobID (   self)

Definition at line 79 of file CheckPhotonLibraryJobs.py.

79 
def jobID(self): return self.subjobID() + "@" + self.server()
def CheckPhotonLibraryJobs.JobIDclass.jobNo (   self)

Definition at line 75 of file CheckPhotonLibraryJobs.py.

75 
def jobNo(self): return self._jobNo
def CheckPhotonLibraryJobs.JobIDclass.parse (   self,
  jobIDstring 
)

Definition at line 66 of file CheckPhotonLibraryJobs.py.

66 
67  def parse(self, jobIDstring):
68  res = JobIDclass.JobIDpattern.match(jobIDstring)
69  if not res: raise InvalidJobID(jobIDstring)
70  self._jobNo = int(res.group(1))
71  self._subjobIndex = int(res.group(2))
72  self._server = res.group(3)
return self
def CheckPhotonLibraryJobs.JobIDclass.server (   self)

Definition at line 77 of file CheckPhotonLibraryJobs.py.

77 
def server(self): return self._server
def CheckPhotonLibraryJobs.JobIDclass.subjobID (   self)

Definition at line 78 of file CheckPhotonLibraryJobs.py.

78 
def subjobID(self): return str(self.jobNo()) + "." + str(self.subjobIndex())
def CheckPhotonLibraryJobs.JobIDclass.subjobIndex (   self)

Definition at line 76 of file CheckPhotonLibraryJobs.py.

76 
def subjobIndex(self): return self._subjobIndex
def CheckPhotonLibraryJobs.JobIDclass.subjobTag (   self)

Definition at line 80 of file CheckPhotonLibraryJobs.py.

80 
81  def subjobTag(self): return str(self.jobNo()) + "_" + str(self.subjobIndex())

Member Data Documentation

CheckPhotonLibraryJobs.JobIDclass._jobNo
private

Definition at line 69 of file CheckPhotonLibraryJobs.py.

CheckPhotonLibraryJobs.JobIDclass._server
private

Definition at line 71 of file CheckPhotonLibraryJobs.py.

CheckPhotonLibraryJobs.JobIDclass._subjobIndex
private

Definition at line 70 of file CheckPhotonLibraryJobs.py.

tuple CheckPhotonLibraryJobs.JobIDclass.JobIDpattern = re.compile(r'^([0-9]+)\.([0-9]+)@(.*)$')
static

Definition at line 62 of file CheckPhotonLibraryJobs.py.


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