1 #ifndef _GEMFIRE_SPEHELPER_HPP_ 2 #define _GEMFIRE_SPEHELPER_HPP_ 12 #include "gfcpp_globals.hpp" 13 #include "TypeHelper.hpp" 26 static void throwNullPointerException(
const char* ename );
28 static void throwClassCastException(
const char* msg,
29 const char* fromType,
const char* toType );
34 template<
class Target,
class Src > Target* getTargetHelper( Src* ptr, gemfire::TypeHelper::yes_type yes )
41 template<
class Target,
class Src > Target* getTargetHelper( Src* ptr, gemfire::TypeHelper::no_type no )
43 Target* tptr =
dynamic_cast< Target*
>( ptr );
48 SPEHelper::throwClassCastException(
"getTargetHelper: cast failed",
49 typeid( ptr ).name( ),
typeid( tptr ).name( ) );
56 template<
class Target,
class Src > Target* getTarget( Src* ptr )
58 return getTargetHelper< Target >( ptr, GF_SRC_IS_TARGET_TYPE( Target, Src ) );
63 template<
class Src >
SharedBase* getSB( Src* ptr )
65 return getTarget< SharedBase >( ptr );
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
Helper class for SharedPtr exceptions.
Definition: SharedPtrHelper.hpp:22
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:31