Declares gridgain::portable::PortableType class template and helping macros to declare binary type specialisation for user types.
More...
#include <stdint.h>
#include <ignite/common/common.h>
#include "gridgain/grid_error.h"
Go to the source code of this file.
Declares gridgain::portable::PortableType class template and helping macros to declare binary type specialisation for user types.
| #define GG_PORTABLE_GET_FIELD_ID_AS_HASH |
Value:int32_t GetFieldId(const char* name) \
{ \
}
IGNITE_IMPORT_EXPORT int32_t GetPortableStringHashCode(const char *val)
Get portable string hash code.
Definition: portable_type.cpp:16
Default implementation of GetFieldId() function which returns Java-way hash code of the string.
| #define GG_PORTABLE_GET_HASH_CODE_ZERO |
( |
|
T | ) |
|
Value:int32_t GetHashCode(const T& obj) \
{ \
return 0; \
}
Implementation of GetHashCode() function which always returns 0.
| #define GG_PORTABLE_GET_NULL_DEFAULT_CTOR |
( |
|
T | ) |
|
Value:T GetNull() \
{ \
return T(); \
}
Implementation of GetNull() function which returns an instance created with defult constructor.
| #define GG_PORTABLE_GET_NULL_NULLPTR |
( |
|
T | ) |
|
Value:T GetNull() \
{ \
return NULL; \
}
Implementation of GetNull() function which returns NULL pointer.
| #define GG_PORTABLE_GET_TYPE_ID_AS_CONST |
( |
|
id | ) |
|
Value:int32_t GetTypeId() \
{ \
return id; \
}
Implementation of GetTypeId() which returns predefined constant.
| #define GG_PORTABLE_GET_TYPE_ID_AS_HASH |
( |
|
typeName | ) |
|
Value:int32_t GetTypeId() \
{ \
}
IGNITE_IMPORT_EXPORT int32_t GetPortableStringHashCode(const char *val)
Get portable string hash code.
Definition: portable_type.cpp:16
Implementation of GetTypeId() which returns hash of passed type name.
| #define GG_PORTABLE_GET_TYPE_NAME_AS_IS |
( |
|
typeName | ) |
|
Value:std::string GetTypeName() \
{ \
return #typeName; \
}
Implementation of GetTypeName() which returns type name as is.
| #define GG_PORTABLE_IS_NULL_FALSE |
( |
|
T | ) |
|
Value:bool IsNull(const T& obj) \
{ \
return false; \
}
Implementation of IsNull() function which always returns false.
| #define GG_PORTABLE_IS_NULL_IF_NULLPTR |
( |
|
T | ) |
|
Value:bool IsNull(const T& obj) \
{ \
return obj; \
}
Implementation of IsNull() function which return true if passed object is null pointer.
| #define GG_PORTABLE_TYPE_START |
( |
|
T | ) |
|
Value:template<> \
struct PortableType<T> \
{
Start portable type definition.