VMware GemFire Native C++ Reference  9.1
SharedPtr.hpp File Reference

Go to the source code of this file.

Data Structures

class  apache::geode::client::SharedPtr< Target >
 Defines a reference counted shared pointer. More...
 

Namespaces

 apache
 Each enum represents a predefined RegionAttributes in a Cache.
 

Functions

template<class TargetSP , class Other >
TargetSP apache::geode::client::dynCast (const SharedPtr< Other > &other)
 Dynamically cast the underlying pointer to the given type and throw ClassCastException if the cast fails. More...
 
template<class TargetSP , class Other >
bool apache::geode::client::instanceOf (const SharedPtr< Other > &other)
 Dynamically check if the underlying pointer is of the given SharedPtr type. More...
 
template<class TargetSP , class Other >
TargetSP apache::geode::client::staticCast (const SharedPtr< Other > &other)
 Statically cast the underlying pointer to the given type. More...
 

Function Documentation

template<class TargetSP , class Other >
TargetSP apache::geode::client::dynCast ( const SharedPtr< Other > &  other)

Dynamically cast the underlying pointer to the given type and throw ClassCastException if the cast fails.

template<class TargetSP , class Other >
bool apache::geode::client::instanceOf ( const SharedPtr< Other > &  other)

Dynamically check if the underlying pointer is of the given SharedPtr type.

template<class TargetSP , class Other >
TargetSP apache::geode::client::staticCast ( const SharedPtr< Other > &  other)

Statically cast the underlying pointer to the given type.

The behaviour is similar to static_cast.

Make use of this cast with care since it does not offer protection against incorrect casts. For most purposes dynCast is the better choice and this should be used only where the programmer knows the cast to be safe.

Setting the macro GF_DEBUG_ASSERTS enables dynamic checking of the cast throwing an AssertionException if the cast fails.


Pivotal GemFire C++ Cache API Documentation