CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes
SequenceVisitors.EndPathValidator Class Reference
Inheritance diagram for SequenceVisitors.EndPathValidator:

Public Member Functions

def __init__ (self)
 
def enter (self, visitee)
 
def leave (self, visitee)
 
def setLabel (self, label)
 

Public Attributes

 filtersOnEndpaths
 

Private Attributes

 __label
 
 _levelInTasks
 

Detailed Description

Definition at line 41 of file SequenceVisitors.py.

Constructor & Destructor Documentation

def SequenceVisitors.EndPathValidator.__init__ (   self)

Member Function Documentation

def SequenceVisitors.EndPathValidator.enter (   self,
  visitee 
)

Definition at line 49 of file SequenceVisitors.py.

References SequenceVisitors.PathValidator.__label, SequenceVisitors.EndPathValidator.__label, Mixins._Labelable.__label, SequenceVisitors.EndPathValidator._levelInTasks, SequenceTypes.ModuleNodeOnTaskVisitor._levelInTasks, SequenceTypes.ModuleNodeNotOnTaskVisitor._levelInTasks, SequenceTypes.ExpandVisitor._levelInTasks, SequenceTypes.DecoratedNodeNameVisitor._levelInTasks, SequenceTypes.DecoratedNodeNamePlusVisitor._levelInTasks, and SequenceVisitors.EndPathValidator.filtersOnEndpaths.

49  def enter(self,visitee):
50  if visitee.isLeaf():
51  if isinstance(visitee, _Labelable):
52  if not visitee.hasLabel_():
53  raise ValueError("EndPath "+self.__label+"contains a module of type '"+visitee.type_()+"' which has\nno assigned label.")
54  elif isinstance(visitee, Service):
55  if not visitee._inProcess:
56  raise ValueError("EndPath "+self.__label+"contains a service of type '"+visitee.type_()+"' which is not attached to the process.\n")
57  if isinstance(visitee, Task):
58  self._levelInTasks += 1
59  if self._levelInTasks > 0:
60  return
61  if isinstance(visitee,EDFilter):
62  if (visitee.type_() in self._presetFilters):
63  if (visitee.type_() not in self.filtersOnEndpaths):
64  self.filtersOnEndpaths.append(visitee.type_())
def SequenceVisitors.EndPathValidator.leave (   self,
  visitee 
)
def SequenceVisitors.EndPathValidator.setLabel (   self,
  label 
)

Member Data Documentation

SequenceVisitors.EndPathValidator.__label
private
SequenceVisitors.EndPathValidator._levelInTasks
private
SequenceVisitors.EndPathValidator.filtersOnEndpaths

Definition at line 44 of file SequenceVisitors.py.

Referenced by SequenceVisitors.EndPathValidator.enter().