+ def ClearFieldSteps( self ):
+ self.fieldsteps = {}
+
+ def AddFieldStep( self, theStampID, theStepID, theValues):
+ aFieldStep = None
+ if self.valtype == 0:
+ aFieldStep = SHAPER_BoolFieldStep()
+ elif self.valtype == 1:
+ aFieldStep = SHAPER_IntFieldStep()
+ elif self.valtype == 2:
+ aFieldStep = SHAPER_DoubleFieldStep()
+
+ aFieldStep.SetStep(theStampID, theStepID, theValues)
+ self.fieldsteps[theStepID] = aFieldStep._this()
+
+ def GetStep( self, theStepID ):
+ return self.fieldsteps[theStepID]
+
+ pass
+
+class SHAPER_FieldStep:
+ """
+ Base class for all step-classes
+ """
+ def __init__ ( self, *args):
+ self.stamp = None # long, ID of stamp
+ self.step = None # long, ID of step
+ self.values = None # array of values of the needed type
+
+ """
+ Defines all parameters of the step
+ """
+ def SetStep( self, theStamp, theStep, theValues ):
+ self.stamp = theStamp
+ self.step = theStep
+ self.values = theValues
+
+ """
+ Returns stamp ID
+ """
+ def GetStamp( self ):
+ return self.stamp
+ """
+ Returns step ID
+ """
+ def GetID( self ):
+ return self.step
+ """
+ Returns a name of a sub-shape if the sub-shape is published in the study
+ """
+ def GetSubShape(self, theSubID):
+ # the SHAPER study does not support sub-shapes for now
+ return ""
+
+
+class SHAPER_DoubleFieldStep(SHAPERSTUDY_ORB__POA.SHAPER_DoubleFieldStep, SHAPER_FieldStep):
+ """
+ Constructs an instance of SHAPERSTUDY Field step of type Double
+ """
+ def __init__ ( self, *args):
+ pass
+
+ """
+ Returns values as an array of the needed type
+ """
+ def GetValues( self ):
+ aResult = [] # to make any type of result, create a corba-type
+ for i in self.values:
+ aResult.append(float(i))
+ return aResult
+
+ pass
+
+class SHAPER_IntFieldStep(SHAPERSTUDY_ORB__POA.SHAPER_IntFieldStep, SHAPER_FieldStep):
+ """
+ Constructs an instance of SHAPERSTUDY Field step of type Double
+ """
+ def __init__ ( self, *args):
+ pass
+
+ """
+ Returns values as an array of the needed type
+ """
+ def GetValues( self ):
+ aResult = [] # to make any type of result, create a corba-type
+ for i in self.values:
+ aResult.append(int(i))
+ return aResult
+
+ pass
+
+class SHAPER_BoolFieldStep(SHAPERSTUDY_ORB__POA.SHAPER_BoolFieldStep, SHAPER_FieldStep):
+ """
+ Constructs an instance of SHAPERSTUDY Field step of type Double
+ """
+ def __init__ ( self, *args):
+ pass
+
+ """
+ Returns values as an array of the needed type
+ """
+ def GetValues( self ):
+ aResult = [] # to make any type of result, create a corba-type
+ for i in self.values:
+ aResult.append(int(i))
+ return aResult