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();
210 #endif // LOG4CPLUS_HELPERS_POINTERS_HEADER_