#include <COWReference.hpp>
Inheritance diagram for BLOCXX_NAMESPACE::COWReference< T >:
Public Types | |
typedef T | element_type |
typedef T *volatile COWReference::* | safe_bool |
Public Member Functions | |
COWReference () | |
Default constructor The underlying object pointer will be NULL. | |
COWReference (T *ptr) | |
Construct a COWReference that will take ownership of a given pointer. | |
COWReference (const COWReference< T > &arg) | |
Copy constructor. | |
template<class U> | |
COWReference (const COWReference< U > &arg) | |
Copy constructor. | |
~COWReference () | |
Destroy this COWReference. | |
COWReference< T > & | operator= (const COWReference< T > &arg) |
Assignment operator. | |
COWReference< T > & | operator= (T *newObj) |
Assignment operator. | |
void | swap (COWReference< T > &arg) |
T * | operator-> () |
const T * | operator-> () const |
T & | operator * () |
const T & | operator * () const |
const T * | getPtr () const |
operator safe_bool () const | |
bool | operator! () const |
Negation operator. | |
template<class U> | |
COWReference< U > | cast_to () const |
template<class U> | |
void | useRefCountOf (const COWReference< U > &) |
Private Member Functions | |
void | decRef () |
void | getWriteLock () |
Private Attributes | |
T *volatile | m_pObj |
Friends | |
class | COWReference |
It supports 'copy on write' functionality.
Definition at line 51 of file COWReference.hpp.
|
Definition at line 54 of file COWReference.hpp. |
|
Definition at line 141 of file COWReference.hpp. |
|
Default constructor The underlying object pointer will be NULL.
|
|
Construct a COWReference that will take ownership of a given pointer.
Definition at line 181 of file COWReference.hpp. |
|
Copy constructor. This constructor will cause this COWReference object to share the same underlying object pointer with another. This will cause the reference count to get incremented the underlying object.
Definition at line 187 of file COWReference.hpp. |
|
Copy constructor. This takes a COWReference of a type derived from T This constructor will cause this COWReference object to share the same underlying object pointer with another. This will cause the reference count to get incremented on the underlying object.
Definition at line 194 of file COWReference.hpp. |
|
Destroy this COWReference. If the reference count to the underlying object is zero after it is decremented in this method it will be deleted. Definition at line 200 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReference< T >::decRef(). |
|
Definition at line 320 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReference< T >::m_pObj, and BLOCXX_NAMESPACE::COWReference< T >::useRefCountOf(). |
|
Reimplemented from BLOCXX_NAMESPACE::COWReferenceBase. Definition at line 213 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceBase::decRef(), and BLOCXX_NAMESPACE::COWReference< T >::m_pObj. Referenced by BLOCXX_NAMESPACE::COWReference< T >::~COWReference(). |
|
Definition at line 312 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReference< T >::m_pObj. Referenced by BLOCXX_NAMESPACE::operator!=(), and BLOCXX_NAMESPACE::operator==(). |
|
Reimplemented from BLOCXX_NAMESPACE::COWReferenceBase. Definition at line 225 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceClone(), BLOCXX_NAMESPACE::COWReferenceBase::getWriteLock(), BLOCXX_NAMESPACE::COWReference< T >::m_pObj, and BLOCXX_NAMESPACE::COWReferenceBase::refCountGreaterThanOne(). Referenced by BLOCXX_NAMESPACE::COWReference< T >::operator *(), and BLOCXX_NAMESPACE::COWReference< T >::operator->(). |
|
Definition at line 301 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceBase::checkNull(), and BLOCXX_NAMESPACE::COWReference< T >::m_pObj. |
|
Definition at line 278 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceBase::checkNull(), BLOCXX_NAMESPACE::COWReference< T >::getWriteLock(), and BLOCXX_NAMESPACE::COWReference< T >::m_pObj. |
|
Definition at line 142 of file COWReference.hpp. |
|
Negation operator.
Definition at line 152 of file COWReference.hpp. |
|
Definition at line 290 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceBase::checkNull(), and BLOCXX_NAMESPACE::COWReference< T >::m_pObj. |
|
Definition at line 266 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceBase::checkNull(), BLOCXX_NAMESPACE::COWReference< T >::getWriteLock(), and BLOCXX_NAMESPACE::COWReference< T >::m_pObj. |
|
Assignment operator. This will cause thise COWReference to release ownership of it's existing object pointer and assume ownership of another.
Definition at line 252 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReference< T >::swap(). |
|
Assignment operator. This changes the underlying object pointer to the one contained by the COWReference object passed as the argument.
Definition at line 245 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReference< T >::swap(). |
|
|
Definition at line 334 of file COWReference.hpp. References BLOCXX_NAMESPACE::COWReferenceBase::useRefCountOf(). Referenced by BLOCXX_NAMESPACE::COWReference< T >::cast_to(). |
|
Definition at line 165 of file COWReference.hpp. |
|