TypeClub

class dsviper.TypeClub

Bases: Type

A club type.

Note: Not directly instantiable.

static cast(type: Type) → TypeClub

Return a type club or raise.

description(*, namespace: NameSpace | None = None) → str

Return the same as representation(): the declared name, qualified against namespace.

documentation() → str

Return the documentation the club was created with, empty when none was given.

is_member(type_concept: TypeConcept) → bool

Return True if type_concept is one of members().

The argument is the member here; TypeConcept.is_member asks the reverse, whether the receiver specialises the argument.

members() → list[TypeConcept]

Return the list of concepts.

representation(*, namespace: NameSpace | None = None) → str

Return the name the type was declared under, qualified against namespace - the global namespace when it is None.

runtime_id() → ValueUUId

Return the uuid identifying this type.

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

type_code() → str

Return the code naming this kind of type, such as “int32”, “struct” or “vector”.

type_name() → TypeName

Return the TypeName: the namespace and the name the type was declared under.