class Transformer(TransformSpec):
Transform
classes) and applies them to document
trees. Also keeps track of components by component type name.Method | __init__ |
Undocumented |
Method | add_pending |
Store a transform with an associated pending node. |
Method | add_transform |
No summary |
Method | add_transforms |
Store multiple transforms, with default priorities. |
Method | apply_transforms |
Apply all of the stored transforms, in priority order. |
Method | get_priority_string |
Return a string, priority combined with self.serialno . |
Method | populate_from_components |
Store each component's default transforms, with default priorities. Also, store components by type name in a mapping for later lookup. |
Instance Variable | applied |
Transforms already applied, in order. |
Instance Variable | components |
Mapping of component type name to component object. Set by self.populate_from_components() . |
Instance Variable | document |
The nodes.document object this Transformer is attached to. |
Instance Variable | serialno |
Internal serial number to keep track of the add order of transforms. |
Instance Variable | sorted |
Boolean: is self.tranforms sorted? |
Instance Variable | transforms |
List of transforms to apply. Each item is a 4-tuple: (priority string, transform class, pending node or None, kwargs). |
Instance Variable | unknown_reference_resolvers |
List of hook functions which assist in resolving references |
Inherited from TransformSpec
:
Method | get_transforms |
Transforms required by this class. Override in subclasses. |
Class Variable | default_transforms |
Undocumented |
priority
to override the default.
kwargs
is a dictionary whose contents are passed as keyword
arguments to the apply
method of the transform. This can be used to
pass application-specific data to the transform instance.Return a string, priority
combined with self.serialno
.
This ensures FIFO order on transforms with identical priority.
dict
=
self.populate_from_components()
.list
=