Exemplo n.º 1
0
 def apply(cls, ws):
    package = ws.getConstantPackage()
    if package.find(cls.__name__) is None:
       ws.apply(cls.dataTypeTemplate)
       if(cls.default is None):
           cls.default = cls.dataTypeTemplate.maxValue
       package.createConstant(cls.__name__, cls.dataTypeTemplate.__name__, cls.default)
Exemplo n.º 2
0
 def apply(cls, ws):
     package = ws.getConstantPackage()
     if package.find(cls.__name__) is None:
         ws.apply(cls.dataTypeTemplate)
         package.createConstant(cls.__name__, cls.dataTypeTemplate.__name__,
                                len(cls.dataTypeTemplate.valueTable) - 1)