Go to the documentation of this file.
49 #ifndef BLOCXX_INTRUSIVE_REFERENCE_HPP_INCLUDE_GUARD_
50 #define BLOCXX_INTRUSIVE_REFERENCE_HPP_INCLUDE_GUARD_
52 #include "blocxx/BLOCXX_config.h"
75 template<
class T>
class IntrusiveReference
122 #ifdef BLOCXX_CHECK_NULL_REFERENCES
123 ReferenceHelpers::checkNull(
this);
124 ReferenceHelpers::checkNull(
m_pObj);
130 #ifdef BLOCXX_CHECK_NULL_REFERENCES
131 ReferenceHelpers::checkNull(
this);
132 ReferenceHelpers::checkNull(
m_pObj);
162 return a.getPtr() == b.getPtr();
166 return a.getPtr() != b.getPtr();
170 return a.getPtr() == b;
174 return a.getPtr() != b;
178 return a == b.getPtr();
182 return a != b.getPtr();
184 #if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
188 return a.getPtr() != b.getPtr();
193 return a.getPtr() < b.getPtr();
195 template<
class T>
void swap(IntrusiveReference<T> & lhs, IntrusiveReference<T> & rhs)
201 return static_cast<T *
>(p.getPtr());
203 template<
class T,
class U> IntrusiveReference<T>
const_pointer_cast(IntrusiveReference<U>
const & p)
205 return const_cast<T *
>(p.getPtr());
207 template<
class T,
class U> IntrusiveReference<T>
dynamic_pointer_cast(IntrusiveReference<U>
const & p)
209 return dynamic_cast<T *
>(p.getPtr());
bool operator<(const Array< T > &x, const Array< T > &y)
const UInt32 INFINITE_TIMEOUT BLOCXX_DEPRECATED
Value that means infinite timeout.
void swap(IntrusiveReference &rhs)
#define BLOCXX_SAFE_BOOL_IMPL(classname, type, variable, test)
IntrusiveReference< T > dynamic_pointer_cast(IntrusiveReference< U > const &p)
IntrusiveReference< U > cast_to() const
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.
BLOCXX_DEPRECATED bool isNull() const
void swap(Array< T > &x, Array< T > &y)
bool operator==(const Array< T > &x, const Array< T > &y)
IntrusiveReference< T > static_pointer_cast(IntrusiveReference< U > const &p)
IntrusiveReference & operator=(IntrusiveReference< U > const &rhs)
void IntrusiveReferenceRelease(IntrusiveCountableBase *p)
IntrusiveReference this_type
IntrusiveReference< T > const_pointer_cast(IntrusiveReference< U > const &p)
void IntrusiveReferenceAddRef(IntrusiveCountableBase *p)