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

Constructor & Destructor Documentation

def SequenceVisitors.PathValidator.__init__ (   self)

Member Function Documentation

def SequenceVisitors.PathValidator.enter (   self,
  visitee 
)

Definition at line 26 of file SequenceVisitors.py.

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

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

Definition at line 36 of file SequenceVisitors.py.

36  def leave(self,visitee):
37  pass
38 
39 # Use this on EndPaths
def SequenceVisitors.PathValidator.setLabel (   self,
  label 
)

Definition at line 24 of file SequenceVisitors.py.

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

24  def setLabel(self,label):
25  self.__label = "'"+label+"' "

Member Data Documentation

SequenceVisitors.PathValidator.__label
private