CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Attributes | Static 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
 

Static Private Attributes

 _presetFilters
 

Detailed Description

Definition at line 42 of file SequenceVisitors.py.

Constructor & Destructor Documentation

◆ __init__()

def SequenceVisitors.EndPathValidator.__init__ (   self)

Definition at line 44 of file SequenceVisitors.py.

44  def __init__(self):
45  self.filtersOnEndpaths = []
46  self.__label = ''
47  self._levelInTasks = 0

Member Function Documentation

◆ enter()

def SequenceVisitors.EndPathValidator.enter (   self,
  visitee 
)

Definition at line 50 of file SequenceVisitors.py.

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_())

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, SequenceVisitors.EndPathValidator._presetFilters, mps_setup.append, and SequenceVisitors.EndPathValidator.filtersOnEndpaths.

◆ leave()

def SequenceVisitors.EndPathValidator.leave (   self,
  visitee 
)

◆ setLabel()

def SequenceVisitors.EndPathValidator.setLabel (   self,
  label 
)

Definition at line 48 of file SequenceVisitors.py.

48  def setLabel(self,label):
49  self.__label = "'"+label+"' "

References SequenceVisitors.PathValidator.__label, SequenceVisitors.EndPathValidator.__label, and Mixins._Labelable.__label.

Member Data Documentation

◆ __label

SequenceVisitors.EndPathValidator.__label
private

◆ _levelInTasks

SequenceVisitors.EndPathValidator._levelInTasks
private

◆ _presetFilters

SequenceVisitors.EndPathValidator._presetFilters
staticprivate

Definition at line 43 of file SequenceVisitors.py.

Referenced by SequenceVisitors.EndPathValidator.enter().

◆ filtersOnEndpaths

SequenceVisitors.EndPathValidator.filtersOnEndpaths

Definition at line 45 of file SequenceVisitors.py.

Referenced by SequenceVisitors.EndPathValidator.enter().

mps_setup.append
append
Definition: mps_setup.py:85