def __init__(self, id, valueType, enum, compRef, kinds,defValue=None, parent=None, mode='readwrite', action='external',
structRef=None, structSeqRef=None, structSeqIdx=None):
"""
Create a new simple property.
Arguments:
id - The property ID
valueType - Type of the property, must be in VALUE_TYPES
compRef - Reference to the PropertySet that owns this property
defValue - Default Python value for this property (default: None)
parent - Parent property that contains this property (default: None)
mode - Mode for the property, must be in MODES (default: 'readwrite')
action - Allocation action type (default: 'external')
Deprecated arguments:
structRef, structSeqRef, structSeqIdx
"""
if valueType not in SCA_TYPES:
raise(Exception('"' + str(valueType) + '"' + ' is not a valid valueType, choose from\n ' + str(SCA_TYPES)))
# Initialize the parent
Property.__init__(self, id, type=valueType, kinds=kinds,compRef=compRef, mode=mode, action=action, parent=parent,
defValue=defValue)
self.valueType = valueType
self.typecode = getTypeCode(self.valueType)
if enum != None:
self._enums = self._parseEnumerations(enum)
else:
self._enums = None
评论列表
文章目录