StructuralFeature |
UserPreferences |
The PEAK Developers' Center | FrontPage | RecentChanges | TitleIndex | WordIndex | SiteNavigation | HelpContents |
StructuralFeature is the base class for "method-exporting properties", such as model.Attribute, model.Collection, etc.
The following class members affect how ?StructuralFeatures are used:
isDerived
Used for "abstract based models". If True, it raises NotImplementedError on get, and acts immutable (see isChangeable).
type: bool
default: False
set by: ?DerivedFeature (True)
isChangeable
Is the slot mutable? If False, it prevents the attribute from being set or unset.
type: bool
default: lambda self: not self.isDerived
set by: structField (True), ?DerivedFeature (True indirectly)
isComposite
XXX (is this deprecated, or just obscure?)
type: bool
default: False
set by: Users (?)
isOrdered
Is the slot an ordered collection? If True, it enables the insertBefore%s accessor. Note that it is only meaningful if isMany is also True.
type: bool
default: False
set by: Sequence (True)
useSlot
Should this slot use a prefixed __dict__ slot? If True, the implementation uses _f_%s as the slot name, otherwise %s is used.
type: bool
default: False
set by: Users (?)
lowerBound
The minimum number of elements that can occupy this slot. 0 means that a value is not required (see isRequired). Integers less than 0 are unchecked degenerate values.
type: int
default: 0
set by: XXX
upperBound
The maximum number of elements that can occupy this slot. None means no limit, 1 means that this slot is not a collection (see isMany). Integers less than 1 are unchecked degenerate values.
type: int or None
default: None
set by: Attribute (1), structField (1).
isRequired
Is a value required for this slot?
type: bool
default: lambda self: self.lowerBound > 0
set by: Attribute (True indirectly), structField (True indirectly)
isMany
Is this slot a collection? If True, enables the add, replace, and remove accessors and also changes the semantics of get and set.
type: bool
default: lambda self: self.upperBound <> 1
set by: Atttribute (False indirectly), structField (False indirectly)
referencedEnd
XXX (something to do with link and unlink notifications if is not None).
type: ComponentName (?) or None
default: None
set by: Users (?)
referencedType
XXX (The type that elements in this slot are allowed to have? Used by users when subclassing Attribute, possibly others)
type: ComponentName or None
default: None
set by: Users (?)
syntax
XXX (Syntax rule for this feature, looks like it's used for documentation/help)
type: None or fmtparse.IRule
default: None
set by: Users (?)
separator
XXX (parsing separator between multivalues, looks like it's used for documentation/help)
type: str
default: ''
set by: Users (?)
sep?MayTerm
XXX (Can separator occur after last value?)
type: bool
default: False
set by: Users (?)
can?BeEmpty
XXX
type: bool
default: False
set by: Users (?)
include?InRepr
XXX (Include feature in default Immutable.__repr__?)
type: bool
default: True
set by: Users (?)
offerAs
XXX
type: IBasicSequence (?)
default: ()
set by: Users (?)
uponAssembly
XXX
type: bool
default: False
set by: Users (?)
permissionNeeded
XXX (I?GuardedDescriptor, declared in peak.security)
type: IGuardedDescriptor or None
default: None
set by: Users (?)