| Apache Ignite C++

ignite::binary::BinaryEnum< T > Struct Template Reference

Binary enum structure. More...

`#include <binary_enum.h>`

## Detailed Description

### template<typename T>
struct ignite::binary::BinaryEnum< T >

Binary enum structure.

Defines a set of functions required for enum type to be serialized and deserialized.

Methods that should be defined: static void GetTypeName(std::string& dst) - should place type name in `dst` parameter. This method should always return the same value. static int32_t GetTypeId() - should return Type ID. static int32_t GetOrdinal(T) - should return ordinal value for enum value. static T FromOrdinal(int32_t) - should return enum value for a given ordinal value. static bool IsNull(const T&) - check whether passed enum object should be interpreted as NULL. static void GetNull(T&) - get NULL value for the given enum type.

It is recommended to use BinaryEnumDefault as a base class for default implementation of GetTypeId(), GetOrdinal() and FromOrdinal() methods for plain enum types. In this case, only GetTypeName() should be implemented by a user directly.

The documentation for this struct was generated from the following file:

- binary_enum.h