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

Constructor & Destructor Documentation

def SequenceVisitors.EndPathValidator.__init__ (   self)

Member Function Documentation

def SequenceVisitors.EndPathValidator.enter (   self,
  visitee 
)

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

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

Referenced by SequenceVisitors.EndPathValidator.enter().