48 #ifndef BLOCXX_COW_INTRUSIVE_REFERENCE_HPP_INCLUDE_GUARD_
49 #define BLOCXX_COW_INTRUSIVE_REFERENCE_HPP_INCLUDE_GUARD_
51 #include "blocxx/BLOCXX_config.h"
203 #ifdef BLOCXX_CHECK_NULL_REFERENCES
204 ReferenceHelpers::checkNull(
this);
205 ReferenceHelpers::checkNull(
m_pObj);
216 #ifdef BLOCXX_CHECK_NULL_REFERENCES
217 ReferenceHelpers::checkNull(
this);
218 ReferenceHelpers::checkNull(
m_pObj);
229 #ifdef BLOCXX_CHECK_NULL_REFERENCES
230 ReferenceHelpers::checkNull(
this);
231 ReferenceHelpers::checkNull(
m_pObj);
243 #ifdef BLOCXX_CHECK_NULL_REFERENCES
244 ReferenceHelpers::checkNull(
this);
245 ReferenceHelpers::checkNull(
m_pObj);
274 #if !defined(__GNUC__) || __GNUC__ > 2 // causes gcc 2.95 to ICE
320 #if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
322 template<
class T>
inline bool operator!=(COWIntrusiveReference<T>
const & a, COWIntrusiveReference<T>
const & b)
324 return a.getPtr() != b.getPtr();
329 return a.
getPtr() < b.getPtr();
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.
~COWIntrusiveReference()
Destroy this COWIntrusiveReference.
COWIntrusiveReference this_type
T *this_type::* unspecified_bool_type
bool operator!() const
Negation operator.
void swap(Array< T > &x, Array< T > &y)
COWIntrusiveReference A smart pointer that uses intrusive reference counting.
COWIntrusiveReference(COWIntrusiveReference< U > const &rhs)
Copy constructor.
COWIntrusiveReference & operator=(COWIntrusiveReference const &rhs)
Assignment operator.
void COWIntrusiveReferenceAddRef(COWIntrusiveCountableBase *p)
T * COWIntrusiveReferenceClone(T *p)
const T * operator->() const
COWIntrusiveReference()
Default constructor The underlying object pointer will be NULL.
COWIntrusiveReference & operator=(T *rhs)
Assignment operator.
bool operator==(const Array< T > &x, const Array< T > &y)
COWIntrusiveReference(T *p, bool addRef=true)
Construct a COWIntrusiveReference that will contain a pointer to a COWIntrusiveCountableBase object...
void swap(COWIntrusiveReference &rhs)
bool COWIntrusiveReferenceUnique(COWIntrusiveCountableBase *p)
void COWIntrusiveReferenceRelease(COWIntrusiveCountableBase *p)
COWIntrusiveReference(COWIntrusiveReference const &rhs)
Copy constructor.
COWIntrusiveReference & operator=(COWIntrusiveReference< U > const &rhs)
Assignment operator that that takes a COWIntrusiveReference of a type derived from T...
const T & operator*() const
void getWriteLock()
Create a clone of the COWIntrusiveCountableBase object if there is more than one reference to it...