Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
docutils.transforms.Transformer Class Reference
Inheritance diagram for docutils.transforms.Transformer:
Inheritance graph
[legend]
Collaboration diagram for docutils.transforms.Transformer:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, document)
 
 add_transform (self, transform_class, priority=None, **kwargs)
 
 add_transforms (self, transform_list)
 
 add_pending (self, pending, priority=None)
 
 get_priority_string (self, priority)
 
 populate_from_components (self, components)
 
 apply_transforms (self)
 
- Public Member Functions inherited from docutils.TransformSpec
 get_transforms (self)
 

Public Attributes

 transforms
 
 unknown_reference_resolvers
 
 document
 
 applied
 
 sorted
 
 components
 
 serialno
 
- Public Attributes inherited from docutils.TransformSpec
 default_transforms
 

Additional Inherited Members

- Static Public Attributes inherited from docutils.TransformSpec
tuple default_transforms = ()
 
tuple unknown_reference_resolvers = ()
 

Detailed Description

Store "transforms" and apply them to the document tree.

Collect lists of `Transform` instances and "unknown_reference_resolvers"
from Docutils components (`TransformSpec` instances).
Apply collected "transforms" to the document tree.

Also keeps track of components by component type name.

https://docutils.sourceforge.io/docs/peps/pep-0258.html#transformer

Member Function Documentation

◆ add_pending()

docutils.transforms.Transformer.add_pending (   self,
  pending,
  priority = None 
)
Store a transform with an associated `pending` node.

◆ add_transform()

docutils.transforms.Transformer.add_transform (   self,
  transform_class,
  priority = None,
**  kwargs 
)
Store a single transform.  Use `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.

◆ add_transforms()

docutils.transforms.Transformer.add_transforms (   self,
  transform_list 
)
Store multiple transforms, with default priorities.

◆ apply_transforms()

docutils.transforms.Transformer.apply_transforms (   self)
Apply all of the stored transforms, in priority order.

Reimplemented in sphinx.transforms.SphinxTransformer.

◆ get_priority_string()

docutils.transforms.Transformer.get_priority_string (   self,
  priority 
)
Return a string, `priority` combined with `self.serialno`.

This ensures FIFO order on transforms with identical priority.

◆ populate_from_components()

docutils.transforms.Transformer.populate_from_components (   self,
  components 
)
Store each component's default transforms and reference resolvers

Transforms are stored with default priorities for later sorting.
"Unknown reference resolvers" are sorted and stored.
Components that don't inherit from `TransformSpec` are ignored.

Also, store components by type name in a mapping for later lookup.

The documentation for this class was generated from the following file: