3 #ifndef GEODE_TYPEHELPER_H_ 4 #define GEODE_TYPEHELPER_H_ 27 #include "geode_globals.hpp" 33 template <
typename Target>
37 template <
typename Target,
int8_t TYPEID>
41 template <
typename Target,
int8_t TYPEID>
42 class CacheableArrayType;
49 namespace TypeHelper {
50 typedef uint8_t yes_type;
51 typedef uint32_t no_type;
53 template <
typename TBase,
typename TDerived>
56 static yes_type check_sig(TDerived
const volatile*, T);
57 static no_type check_sig(TBase
const volatile*,
int);
69 template <
typename TBase,
typename TDerived>
73 operator TBase
const volatile*()
const;
74 operator TDerived
const volatile*();
78 static const bool result =
sizeof(BDHelper<TBase, TDerived>::check_sig(
79 Host(), 0)) ==
sizeof(yes_type);
86 template <
typename TBase>
88 static const bool result =
true;
95 template <
bool getType = true>
97 static const yes_type value = 0;
105 static const no_type value = 0;
119 template <
class T,
int8_t ID>
129 #define GF_UNWRAP_SP(T) \ 130 typename apache::geode::client::TypeHelper::UnwrapSharedPtr<T>::type 136 #define GF_TYPE_IS_SERIALIZABLE(T) \ 137 apache::geode::client::TypeHelper::SuperSubclass< \ 138 apache::geode::client::Serializable, T>::result 145 #define GF_TYPE_IS_SERIALIZABLE_TYPE(T) \ 146 apache::geode::client::TypeHelper::YesNoType<GF_TYPE_IS_SERIALIZABLE( \ 149 #define GF_SRC_IS_TARGET_TYPE(TARGET, SRC) \ 150 apache::geode::client::TypeHelper::YesNoType< \ 151 apache::geode::client::TypeHelper::SuperSubclass<TARGET, \ 154 #endif // GEODE_TYPEHELPER_H_ This struct helps us determine whether or not a class is a subclass of another at compile time...
Definition: TypeHelper.hpp:70
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
This struct helps convert a boolean value into static objects of different types. ...
Definition: TypeHelper.hpp:96
Template class for array of primitive types.
Definition: CacheableBuiltins.hpp:178
This struct unwraps the type T inside SharedPtr.
Definition: TypeHelper.hpp:110
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:52
Template class for CacheableArrayType SharedPtr's that adds [] operator.
Definition: CacheableBuiltins.hpp:144
This namespace contains all the Geode C++ API classes, enumerations and globals.