DSMAttachment

class dsviper.DSMAttachment

Bases: object

An attachment as declared: its qualified name, the key type it files under, and the type of the document it holds.

Note: Not directly instantiable.

document_type() → DSMType

Return the type of the document as the model writes it - a DSMTypeReference when it is named, a DSM type such as DSMTypeVector when it is spelled out.

documentation() → str

Return the attachment’s documentation - its doc comment in the DSM text, or the documentation given to Definitions - empty when there is none.

identifier() → str

Return the identifier, unique among the attachments: the attachment’s namespace, its key type written relative to that namespace, and its name. App::User.profile for an attachment profile of namespace App on a concept User of App; App::Lib::User.profile when the concept is Lib’s; App::any_concept.tag for a key any_concept.

key_type() → DSMTypeReference

Return the reference to the key type: a concept, a club or any_concept (its domain() says which).

representation() → str

Return the DSM text of the whole declaration: attachment<key_type, document_type> followed by the qualified name. The other representation() methods of the DSM classes spell one type.

runtime_id() → ValueUUId

Return the uuid identifying this attachment.

It is computed from what the attachment is, so the same declaration yields the same id in any Definitions. Definitions says what each kind is computed from.

type_name() → TypeName

Return the TypeName.