38#ifndef BLOCXX_COWREFERENCE_HPP_INCLUDE_GUARD_
39#define BLOCXX_COWREFERENCE_HPP_INCLUDE_GUARD_
40#include "blocxx/BLOCXX_config.h"
153#if !defined(__GNUC__) || __GNUC__ > 2
204 typedef char type_must_be_complete[
sizeof(T)];
257#ifdef BLOCXX_CHECK_NULL_REFERENCES
258 ReferenceHelpers::checkNull(
this);
259 ReferenceHelpers::checkNull(m_pObj);
269#ifdef BLOCXX_CHECK_NULL_REFERENCES
270 ReferenceHelpers::checkNull(
this);
271 ReferenceHelpers::checkNull(m_pObj);
281#ifdef BLOCXX_CHECK_NULL_REFERENCES
282 ReferenceHelpers::checkNull(
this);
283 ReferenceHelpers::checkNull(m_pObj);
292#ifdef BLOCXX_CHECK_NULL_REFERENCES
293 ReferenceHelpers::checkNull(
this);
294 ReferenceHelpers::checkNull(m_pObj);
309 return (m_pObj == 0);
318 rval.
m_pObj =
dynamic_cast<U*
>(m_pObj);
335template <
class T,
class U>
341template <
class T,
class U>
347template <
class T,
class U>
#define BLOCXX_SAFE_BOOL_IMPL(classname, type, variable, test)
void useRefCountOf(const COWReferenceBase &arg)
void swap(COWReferenceBase &arg)
bool refCountGreaterThanOne() const
COWReference A smart pointer that uses non-intrusive reference counting.
COWReference(const COWReference< U > &arg)
Copy constructor.
COWReference(T *ptr)
Construct a COWReference that will take ownership of a given pointer.
COWReference< U > cast_to() const
void useRefCountOf(const COWReference< U > &)
friend class COWReference
void swap(COWReference< T > &arg)
~COWReference()
Destroy this COWReference.
COWReference()
Default constructor The underlying object pointer will be NULL.
bool isNull() const BLOCXX_DEPRECATED
COWReference(const COWReference< T > &arg)
Copy constructor.
const T & operator*() const
COWReference< T > & operator=(const COWReference< T > &arg)
Assignment operator.
const T * operator->() const
T * COWReferenceClone(T *obj)
bool operator<(const Array< T > &x, const Array< T > &y)
bool operator==(const Array< T > &x, const Array< T > &y)
void COWRefSwap(T &x, T &y)
bool operator!=(const Array< T > &x, const Array< T > &y)
Determine two Arrays are not equal.