00001 #ifndef _GEMFIRE_SHAREDBASE_HPP_
00002 #define _GEMFIRE_SHAREDBASE_HPP_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "gfcpp_globals.hpp"
00016
00020 namespace gemfire {
00021
00022
00029 class CPPCACHE_EXPORT SharedBase {
00030
00031 public:
00032
00034 SharedBase( )
00035 : m_refCount( 0 )
00036 {
00037 }
00038
00040 void preserveSB() const;
00042 void releaseSB() const;
00043
00045 inline int32_t refCount()
00046 {
00047 return m_refCount;
00048 }
00049
00050 protected:
00051
00052 virtual ~SharedBase()
00053 {}
00054
00055
00056 private:
00057
00058 volatile int32_t m_refCount;
00059
00060 void operator = (const SharedBase& rhs);
00061
00062 };
00063
00064 }
00065
00066 #endif //#define _GEMFIRE_SHAREDBASE_HPP_