ark::serialization::EnumDescriptor
Defined in header “ark/serialization/schema.hh”.
An enum descriptor stores metadata about a particular enumeration. Specifically, it stores the name, and the mapping of values to names.
Methods
-
std::string type_name()
Convenience routine, to return the type name of this enum. This is an identifier able to uniquely identify this enum. -
std::string value_to_string(int64_t value)
Returns a human-readable string for the given value. This is a direct lookup if the enum type is a value. if it is a bitmask, returns all bits that are set (as strings). -
bool operator==(const EnumDescriptor & other)
Variables
-
std::string name
The name of this enumeration. -
std::string object_namespace
The namespace this enumeration belongs to. -
FieldType enum_class= FieldType::INT32
The backing type of enumeration (the enum “class” in C++ language). -
EnumType enum_type= EnumType::Value
The type of the enumeration. -
std::map< std::string, int64_t > values
A mapping of enumerations to their respective values. -
std::vector< std::string > comments
A list of comments associated with this enumeration. -
std::optional< SourceLocation > source_location
An optional source location (may or may not be present).