ValueEnumeration

class dsviper.ValueEnumeration

Bases: object

A class used to represent a value of type struct. Seamless with a Python str.

Or use Value.create(type_enumeration [, initial_value]). If the initial_value is not specified, the first enum case is used.

The string representation of an enum case start with a ‘.’. ex: Value.create(type_enum_E, ‘.a’) or Value.create(type_enum_E, ‘E.a’).

static cast(value: Value) ValueEnumeration

Return an enum or raise.

copy() ValueEnumeration

Return a deep copy.

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

Return the description.

hash() int

Return the hash value.

index() int

Return the index.

name() str

Return the name of the enumeration case.

representation() str

Return the representation.

static try_parse(string: str, type_enumeration: TypeEnumeration) ValueEnumeration | None

Return an enum or None.

type() Type

Return the type.

type_code() str

Return the type code.

type_enumeration() TypeEnumeration

Return the type enum.