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
320#if __GNUC__ == 2 && __GNUC_MINOR__ <= 96
322template<
class T>
inline bool operator!=(COWIntrusiveReference<T>
const & a, COWIntrusiveReference<T>
const & b)
324 return a.getPtr() != b.getPtr();
COWIntrusiveReference A smart pointer that uses intrusive reference counting.
COWIntrusiveReference & operator=(T *rhs)
Assignment operator.
COWIntrusiveReference & operator=(COWIntrusiveReference const &rhs)
Assignment operator.
~COWIntrusiveReference()
Destroy this COWIntrusiveReference.
COWIntrusiveReference(T *p, bool addRef=true)
Construct a COWIntrusiveReference that will contain a pointer to a COWIntrusiveCountableBase object.
COWIntrusiveReference(COWIntrusiveReference< U > const &rhs)
Copy constructor.
bool operator!() const
Negation operator.
COWIntrusiveReference(COWIntrusiveReference const &rhs)
Copy constructor.
T *this_type::* unspecified_bool_type
const T * operator->() const
COWIntrusiveReference this_type
COWIntrusiveReference()
Default constructor The underlying object pointer will be NULL.
void getWriteLock()
Create a clone of the COWIntrusiveCountableBase object if there is more than one reference to it.
void swap(COWIntrusiveReference &rhs)
const T & operator*() const
COWIntrusiveReference & operator=(COWIntrusiveReference< U > const &rhs)
Assignment operator that that takes a COWIntrusiveReference of a type derived from T.
T * COWIntrusiveReferenceClone(T *p)
void COWIntrusiveReferenceAddRef(COWIntrusiveCountableBase *p)
void COWIntrusiveReferenceRelease(COWIntrusiveCountableBase *p)
bool operator<(const Array< T > &x, const Array< T > &y)
bool operator==(const Array< T > &x, const Array< T > &y)
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.
void swap(Array< T > &x, Array< T > &y)
bool COWIntrusiveReferenceUnique(COWIntrusiveCountableBase *p)