TypeIndex
- class TypeIndex
Description
Elements by exact Python class, built once by
build_type_index().Given a
modelthat declarespart def Vehicle;andpart def Car :> Vehicle;inpackage P:index = build_type_index(model) index.by_exact_type[syside.PartDefinition] # [P::Vehicle, P::Car]
by_exact_typemaps each class that occurs in the indexed documents to the elements of exactly that class, in scan order. A lookup forX.STDreads the bucket of every class that matches, so one index serves everyelement_type.Inheritance:
Members defined in
TypeIndex(3 members)RWRWThe deprecated
library_elementsthe index was built with, elseNone.RWThe tiers the index was built over;
Nonewhen it was built over the model’s own documents (the default build, a deprecatedlibrary_elementsbuild, or a hand-built index).Attributes
- by_exact_type: dict[type[syside.Element], list[syside.Element]] = None
- library_elements: syside.query.LibraryElements | None = None
The deprecated
library_elementsthe index was built with, elseNone.
- tiers: frozenset[syside.DocumentTier] | None = None
The tiers the index was built over;
Nonewhen it was built over the model’s own documents (the default build, a deprecatedlibrary_elementsbuild, or a hand-built index).
Used by