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 40 of file SequenceVisitors.py.

Constructor & Destructor Documentation

def SequenceVisitors.EndPathValidator.__init__ (   self)

Member Function Documentation

def SequenceVisitors.EndPathValidator.enter (   self,
  visitee 
)

Definition at line 48 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.

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

Referenced by SequenceVisitors.EndPathValidator.enter().