Ignore changes in the amount of whitespace
Differences between version dated 2004-02-23 17:28:15 and 2007-08-11 11:37:37
(spanning 2 versions)
Deletions are marked like this.
Additions are marked like this.
The following class members affect how StructuralFeatures are used:
isDerived
Used for computed attributes. If ``True``, it raises ``NotImplementedError`` on get,
and acts immutable (see ``isChangeable``). You must define a ``get()`` method on the
Used for computed attributes. If ``True``, it raises ``NotImplementedError`` on get,
and acts immutable (see ``isChangeable``). You must define a ``get()`` method on the
feature that computes the intended value.
:type: ``bool``
:default: ``False``
: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: ``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 attribute be stored in a ``__slots__`` slot? If ``True``, the implementation
uses ``_f_%s`` as the slot name, otherwise ``%s`` is used. You *must* have the
Should this attribute be stored in a ``__slots__`` slot? If ``True``, the implementation
uses ``_f_%s`` as the slot name, otherwise ``%s`` is used. You *must* have the
``_f_``-prefixed name in the ``__slots__`` of the element class (or an ancestor thereof)
:type: ``bool``
:set by: Users
lowerBound
The minimum number of elements that can occupy this slot. ``0`` means that a value is
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``
:set by: Attribute (``True`` indirectly), structField (``True`` indirectly)
isMany
Is this slot a collection? If ``True``, enables the add, replace, and remove
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``
referencedEnd
For bidirectional links, this is the name of the "inverse" feature. So, e.g. in a
parent-child relationship, the ``parent`` feature might have a ``referencedEnd`` of
parent-child relationship, the ``parent`` feature might have a ``referencedEnd`` of
``"child"``, and vice versa.
:type: ``ComponentName`` (?) or ``None``
:default: ``None``
:set by: Users (?)
referencedType
The type of the feature, or a name that references a type. Various behaviors of
The type of the feature, or a name that references a type. Various behaviors of
the feature are delegated to its type, such as conversion operations, normalization,
parsing, etc. (Used by users when subclassing ``model.Attribute``, possibly others)
:type: ``model.Type`` (``model.IType``, really), ``ComponentName`` or ``None``
:default: ``None``
:set by: Users
syntax
Syntax rule for this feature, used when adapting a feature to ``fmtparse.IRule``, so
that features can be used as part of the syntax specification for the type they're
Syntax rule for this feature, used when adapting a feature to ``fmtparse.IRule``, so
that features can be used as part of the syntax specification for the type they're
a part of.
:type: ``None`` or ``fmtparse.IRule``
:set by: Users
separator
parsing separator between multivalues, also used when adapting a feature
parsing separator between multivalues, also used when adapting a feature
to ``fmtparse.IRule``.
:type: ``str``
:type: ``bool``
:default: ``False``
:set by: Users (?)
canBeEmpty
Is an empty string a valid parse match for this feature?
:set by: Users (?)
includeInRepr
Should this feature be included in the default ``Immutable.__repr__``? Immutable
types normally display all of their features as part of their ``repr()``, but
sometimes you may have features that you don't want displayed as part of a repr,
Should this feature be included in the default ``Immutable.__repr__``? Immutable
types normally display all of their features as part of their ``repr()``, but
sometimes you may have features that you don't want displayed as part of a repr,
perhaps because they have very large contents.
:type: ``bool``
:set by: Users (?)
offerAs
This is the same as ``offerAs`` in ``binding.Attribute`` -- see
This is the same as ``offerAs`` in ``binding.Attribute`` -- see
``peak help binding.Attribute``
:type: ``IBasicSequence`` (?)
:set by: Users (?)
uponAssembly
This is the same as ``uponAssembly`` in ``binding.Attribute`` -- see
This is the same as ``uponAssembly`` in ``binding.Attribute`` -- see
``peak help binding.Attribute``
:type: ``bool``