 |
GridGain C++
|
Go to the documentation of this file.
23 #ifndef _IGNITE_BINARY_BINARY_ENUM
24 #define _IGNITE_BINARY_BINARY_ENUM
28 #include <ignite/common/common.h>
81 return static_cast<int32_t
>(value);
91 return static_cast<T
>(ordinal);
133 template <
typename T>
146 return BinaryEnumDereferenced::GetTypeId();
156 BinaryEnumDereferenced::GetTypeName(dst);
166 return BinaryEnumDereferenced::GetOrdinal(*value);
176 return new T(BinaryEnumDereferenced::FromOrdinal(ordinal));
187 return !obj || BinaryEnumDereferenced::IsNull(*obj);
203 #endif //_IGNITE_BINARY_BINARY_ENUM
Ignite API.
Definition: cache.h:47
Binary enum structure.
Definition: binary_enum.h:53
static bool IsNull(const T &val)
Check whether passed binary object should be interpreted as NULL.
Definition: binary_enum.h:106
static int32_t GetOrdinal(T *value)
Get enum type ordinal.
Definition: binary_enum.h:164
static void GetNull(T &dst)
Get NULL value for the given binary type.
Definition: binary_enum.h:116
Default implementations of BinaryEnum.
Definition: binary_enum.h:59
static int32_t GetTypeId()
Get type ID for the enum type.
Definition: binary_enum.h:66
static int32_t GetOrdinal(T value)
Get enum type ordinal.
Definition: binary_enum.h:79
Implementations of BinaryEnum nullability when INT32_MIN ordinal value used as a NULL indicator.
Definition: binary_enum.h:99
static bool IsNull(T *const &obj)
Check whether passed enum should be interpreted as NULL.
Definition: binary_enum.h:185
BinaryEnum< T > BinaryEnumDereferenced
Actual type.
Definition: binary_enum.h:137
static int32_t GetTypeId()
Get binary object type ID.
Definition: binary_enum.h:144
IGNITE_IMPORT_EXPORT int32_t GetBinaryStringHashCode(const char *val)
Get binary string hash code.
Definition: binary_type.cpp:24
static T FromOrdinal(int32_t ordinal)
Get enum value for the given ordinal value.
Definition: binary_enum.h:89
static void GetNull(T *&dst)
Get NULL value for the enum type.
Definition: binary_enum.h:195
static T * FromOrdinal(int32_t ordinal)
Get enum value for the given ordinal value.
Definition: binary_enum.h:174
Default implementations of BinaryType hashing functions and non-null type behaviour.
Definition: binary_enum.h:126
static void GetTypeName(std::string &dst)
Get binary object type name.
Definition: binary_enum.h:154