DefinitionsConst¶
- class dsviper.DefinitionsConst¶
Bases:
objectA class used to retreive registered concepts, clubs, enumerations, structures and attachments.
Note: Not directly instantiable.
- attachments() list[Attachment]¶
Return the list of attachments.
- check_attachment(attachment_runtime_id: ValueUUId) Attachment¶
Return the attachment or raise.
- check_concept(runtime_id: ValueUUId) TypeConcept¶
Return the concept or raise.
- check_enumeration(runtime_id: ValueUUId) TypeEnumeration¶
Return the enum or raise.
- check_structure(runtime_id: ValueUUId) TypeStructure¶
Return a struct or raise.
- collector() DefinitionsCollector¶
Return a collector.
- concept_members(type_concept: TypeConcept) list[TypeConcept]¶
Return the list of related concepts.
- concepts() list[TypeConcept]¶
Return the list of concepts.
- contains(definitions: DefinitionsConst) bool¶
return True if the types and attachments of the definitions are known.
- copy() Definitions¶
Return a copy immutable of the definitions.
- discard() None¶
Remove from the __main__ module the injected constants.
- encode(*, stream_codec_instancing: StreamCodecInstancing | None = None) ValueBlob¶
Return the blob that encodes the definitions with a StreamTokenBinaryCodec if not specified.
- enumerations() list[TypeEnumeration]¶
Return the list of enums.
- extract(definitions_collector: DefinitionsCollector) Definitions¶
Create and return a new Definitions from the collected types.
- hexdigest() str¶
Return the hexdigest.
- inject() None¶
Fill the __main__ module with constants for all definitions. <namespace>_T_<name> for a concept or a club. <namespace>_K_<name> for a key of a concept or a club. <namespace>_S_<name> for a structure. <namespace>_E_<name> for a enumeration. <namespace>_P_<name>_… is the path for a property of the structure. <namespace>_A_<key.name>_<name> for an attachment.
- is_equal(definitions: DefinitionsConst) bool¶
Return True if self and definitions are equals.
- query_attachment(attachment_runtime_id: ValueUUId) Attachment | None¶
Return the attachment or None.
- query_concept(runtime_id: ValueUUId) TypeConcept | None¶
Return the concept or None.
- query_enumeration(runtime_id: ValueUUId) TypeEnumeration | None¶
Return the enum or None.
- query_structure(runtime_id: ValueUUId) TypeStructure | None¶
Return a struct or None.
- structures() list[TypeStructure]¶
Return the list of structs.
- to_dsm_definitions() DSMDefinitions¶
Convert and return a DSMDefinition.
- write(stream_writing: StreamWriting) None¶
Write to a stream.