CMS 3D CMS Logo

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

Public Member Functions

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

Private Attributes

 __label
 

Detailed Description

Definition at line 23 of file SequenceVisitors.py.

Constructor & Destructor Documentation

◆ __init__()

def SequenceVisitors.PathValidator.__init__ (   self)

Definition at line 24 of file SequenceVisitors.py.

24  def __init__(self):
25  self.__label = ''

Member Function Documentation

◆ enter()

def SequenceVisitors.PathValidator.enter (   self,
  visitee 
)

Definition at line 28 of file SequenceVisitors.py.

28  def enter(self,visitee):
29  if isinstance(visitee,OutputModule):
30  raise ValueError("Path "+self.__label+"cannot contain an OutputModule, '"+visitee.type_()+"', with label '"+visitee.label_()+"'")
31  if visitee.isLeaf():
32  if isinstance(visitee, _Labelable):
33  if not visitee.hasLabel_():
34  raise ValueError("Path "+self.__label+"contains a module of type '"+visitee.type_()+"' which has no assigned label.")
35  elif isinstance(visitee, Service):
36  if not visitee._inProcess:
37  raise ValueError("Path "+self.__label+"contains a service of type '"+visitee.type_()+"' which is not attached to the process.\n")

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

◆ leave()

def SequenceVisitors.PathValidator.leave (   self,
  visitee 
)

Definition at line 38 of file SequenceVisitors.py.

38  def leave(self,visitee):
39  pass
40 
41 # Use this on EndPaths

◆ setLabel()

def SequenceVisitors.PathValidator.setLabel (   self,
  label 
)

Definition at line 26 of file SequenceVisitors.py.

26  def setLabel(self,label):
27  self.__label = "'"+label+"' "

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

Member Data Documentation

◆ __label

SequenceVisitors.PathValidator.__label
private