def __init__(self, id, type, kinds, compRef, mode='readwrite', action='external', parent=None, defValue=None):
"""
compRef - (domainless.componentBase) - pointer to the component that owns this property
type - (string): type of property (SCA Type or 'struct' or 'structSequence')
id - (string): the property ID
mode - (string): mode for the property, must be in MODES
parent - (Property): the property that contains this instance (e.g., struct that holds a simple)
"""
self.id = id
self.type = type
self.compRef = compRef
if mode not in self.MODES:
print str(mode) + ' is not a valid mode, defaulting to "readwrite"'
self.mode = 'readwrite'
else:
self.mode = mode
self.action = action
self._parent = parent
self.defValue = defValue
if kinds:
self.kinds = kinds
else:
# Default to "configure" if no kinds given
self.kinds = ('configure',"property")
评论列表
文章目录