This method returns the object of the container on which the attribute change happened.
[Example]
See example for GetOperatorForComponent below.
|
|
program component to get an operator for it
|
|
|
Object of CENPyOlpTech_AttribChangedOperator class that represents attribute change operator for program, operation group or operation.
|
This method returns object of the container on which the attribute change happened.
[Example]
# Code shows how to propagate attribute values from Program level to Operation level
# get attribute getter and setter
def PostTechOnAttribChanged(Operator):
attribGetter = Operator.GetAttribGetter()
attribSetter = Operator.GetAttribSetter()
# get the changed attribute name and check if we have to do something
changedAttribute = Operator.GetChangedAttribute()
changedAttributeName = changedAttribute.GetName()
if (changedAttribute.GetName() == "TestMaster"):
intAttrib = attribGetter.GetAttributeIntegerByName("TestMaster")
if intAttrib != None:
program = Operator.GetChangedComponent()
if program.GetType() == OLPPROGRAMCOMPONENTTYPE_PROGRAM:
groupComponents = program.GetChildComponents()
for groupComponent in groupComponents:
if (groupComponent.GetType() == OLPPROGRAMCOMPONENTTYPE_OPERATIONGROUP):
operationComponents = groupComponent.GetChildComponents()
for operationComponent in operationComponents:
if (operationComponent.GetType() == OLPPROGRAMCOMPONENTTYPE_OPERATION):
componentOperator = Operator.GetOperatorForComponent(operationComponent)
componentAttribSetter = componentOperator.GetAttribSetter()
componentAttribSetter.SetInteger("TestSubscriber", intAttrib.GetValue())
|