DSMDefinitions¶
- class dsviper.DSMDefinitions¶
Bases:
objectA class used to represent DSM definitions. Available representations are plain-text, HTML, JSON, Bson, binary. Use the static factory method to get the definitions from various representation.
Note: Not directly instantiable.
- attachment_function_pools() list[DSMAttachmentFunctionPool]¶
Return the list of attachment function pools.
- attachments() list[DSMAttachment]¶
Return the list of attachments.
- static bson_decode(blob: ValueBlob) DSMDefinitions¶
Return a DSMDefinitions from a bson encoded blob.
- concepts() list[DSMConcept]¶
Return the list of concepts.
- static decode(blob: ValueBlob, *, stream_codec_instancing: StreamCodecInstancing | None = None) DSMDefinitions¶
Return the decoded DSMDefinitions with a StreamTokenBinaryCodec if not specified.
- encode(*, stream_codec_instancing: StreamCodecInstancing | None = None) ValueBlob¶
Return the blob that encodes the definitions with a StreamTokenBinaryCodec if not specified.
- enumerations() list[DSMEnumeration]¶
Return the list of enumerations.
- static from_attachment_function_pool(attachment_function_pool: AttachmentFunctionPool, definitions: DefinitionsConst) DSMDefinitions¶
Convert to DSM Definitions.
- static from_definitions(definitions: DefinitionsConst) DSMDefinitions¶
Convert to DSM Definitions.
- static from_function_pool(function_pool: FunctionPool, definitions: DefinitionsConst) DSMDefinitions¶
Convert to DSM Definitions.
- function_pools() list[DSMFunctionPool]¶
Return the list of function pools.
- static json_decode(json_string: str) DSMDefinitions¶
Return a DSMDefinitions from a JSON encoded string.
- json_encode(indent: int = -1) str¶
Encode and return the definitions in a JSON encoded string. If indent is specified, the string is pretty printed.
- static read(stream_reading: StreamReading) DSMDefinitions¶
Return a DSMDefinitions.
- structures() list[DSMStructure]¶
Return the list of structures.
- to_definitions() Definitions¶
Return a Definitions by converting all DSM definitions.
- to_dsm(*, show_documentation=True, show_runtime_id=False, html=False, attachments: list[DSMAttachment] | None = None) str¶
Return the definitions in the DSM language (DSL) sorted by attachment dependencies. All attachments are used, if the parameter attachments is not specified or empty.
- write(stream_writing: StreamWriting) None¶
Write the definitions with the StreamWriting interface.