29 #ifndef LOG4CPLUS_HELPERS_POINTERS_HEADER_
30 #define LOG4CPLUS_HELPERS_POINTERS_HEADER_
34 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
41 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
57 void removeReference() const;
87 #if defined (LOG4CPLUS_SINGLE_THREADED)
88 typedef unsigned count_type;
90 typedef std::atomic<unsigned> count_type;
92 mutable count_type count__;
112 : pointee(rhs.pointee)
118 : pointee (std::move (rhs.pointee))
133 pointee->removeReference();
138 {
return (pointee == rhs.pointee); }
140 {
return (pointee != rhs.pointee); }
141 bool operator==(
const T* rhs)
const {
return (pointee == rhs); }
142 bool operator!=(
const T* rhs)
const {
return (pointee != rhs); }
144 T&
operator*()
const {assert (pointee);
return *pointee; }
158 T*
get()
const {
return pointee; }
162 std::swap (pointee, other.pointee);
181 pointee->addReference();
SharedObjectPtr(SharedObjectPtr &&rhs) LOG4CPLUS_NOEXCEPT
bool operator!=(const T *rhs) const
bool operator==(const SharedObjectPtr &rhs) const
SharedObjectPtr(T *realPtr=0) LOG4CPLUS_NOEXCEPT
SharedObjectPtr(const SharedObjectPtr &rhs) LOG4CPLUS_NOEXCEPT
SharedObjectPtr & operator=(const SharedObjectPtr &rhs)
void swap(SharedObjectPtr &other) LOG4CPLUS_NOEXCEPT
SharedObjectPtr & operator=(SharedObjectPtr &&rhs) LOG4CPLUS_NOEXCEPT
T *(SharedObjectPtr::* unspec_bool_type)() const
bool operator!=(const SharedObjectPtr &rhs) const
SharedObjectPtr & operator=(T *rhs)
bool operator==(const T *rhs) const
SharedObject(SharedObject &&)
void removeReference() const
SharedObject(const SharedObject &)
SharedObject & operator=(const SharedObject &) LOG4CPLUS_NOEXCEPT
void addReference() const LOG4CPLUS_NOEXCEPT
SharedObject & operator=(SharedObject &&) LOG4CPLUS_NOEXCEPT
thread::Mutex access_mutex
#define LOG4CPLUS_NOEXCEPT
void intrusive_ptr_add_ref(SharedObject const *so)
Boost intrusive_ptr helpers.
void intrusive_ptr_release(SharedObject const *so)