ModelPrinter
- class ModelPrinter
Pretty-printer for KerML/SysML models back to textual syntax.
Note that the printer primarily assumes that the model is representable in textual syntax, and does not check if some elements can be printed or not, or ignores some elements that are otherwise to represent in the textual syntax. However, elements that are required by the textual syntax, but are missing in the model, will raise
RuntimeError.Members defined in
ModelPrinter(5 members)
RWWhether to ignore
syside-format ignorepragmas and format such elements regardless
RWFormat options used by this printer
RWCurrent language mode of this printer
Create a printer for KerML.
Create a printer for SysML.
Attributes
- property force_formatting: bool
Whether to ignore
syside-format ignorepragmas and format such elements regardless
- property format: syside.FormatOptions
Format options used by this printer
- property mode: syside.PrintMode
Current language mode of this printer
Methods
- static kerml(format: syside.FormatOptions = ..., force_formatting: bool = False, reference_printer: syside.ReferencePrinter = ...) syside.ModelPrinter
Create a printer for KerML.
reference_printeris only used for synthetic references, otherwise the original reference segments will be printed.
- static sysml(format: syside.FormatOptions = ..., force_formatting: bool = False, reference_printer: syside.ReferencePrinter = ...) syside.ModelPrinter
Create a printer for SysML.
reference_printeris only used for synthetic references, otherwise the original reference segments will be printed.