#include <COWIntrusiveReference.hpp>
Collaboration diagram for BLOCXX_NAMESPACE::COWIntrusiveReference< T >:

Public Types | |
| typedef T | element_type |
| typedef T *this_type::* | unspecified_bool_type |
Public Member Functions | |
| COWIntrusiveReference () | |
| Default constructor The underlying object pointer will be NULL. | |
| COWIntrusiveReference (T *p, bool addRef=true) | |
| Construct a COWIntrusiveReference that will contain a pointer to a COWIntrusiveCountableBase object. | |
| template<class U> | |
| COWIntrusiveReference (COWIntrusiveReference< U > const &rhs) | |
| Copy constructor. | |
| COWIntrusiveReference (COWIntrusiveReference const &rhs) | |
| Copy constructor. | |
| ~COWIntrusiveReference () | |
| Destroy this COWIntrusiveReference. | |
| template<class U> | |
| COWIntrusiveReference & | operator= (COWIntrusiveReference< U > const &rhs) |
| Assignment operator that that takes a COWIntrusiveReference of a type derived from T. | |
| COWIntrusiveReference & | operator= (COWIntrusiveReference const &rhs) |
| Assignment operator. | |
| COWIntrusiveReference & | operator= (T *rhs) |
| Assignment operator. | |
| const T * | getPtr () const |
| const T & | operator * () const |
| const T * | operator-> () const |
| T & | operator * () |
| T * | operator-> () |
| operator unspecified_bool_type () const | |
| bool | operator! () const |
| Negation operator. | |
| void | swap (COWIntrusiveReference &rhs) |
Private Types | |
| typedef COWIntrusiveReference | this_type |
Private Member Functions | |
| void | getWriteLock () |
| Create a clone of the COWIntrusiveCountableBase object if there is more than one reference to it. | |
Private Attributes | |
| T * | m_pObj |
Friends | |
| class | COWIntrusiveReference |
It supports 'copy on write' functionality. The 'intrusive' in the class names comes from the fact that referenced objects are required to be sub-classes of COWIntrusiveCountableBase. If your looking for a non-intrusive smart smart pointer class that providers copy on write functionality, check out the COWReference class.
This class relies on calls to void COWIntrusiveReferenceAddRef(T* p); void COWIntrusiveReferenceRelease(T* p); bool COWIntrusiveReferenceUnique(T* p); T* COWIntrusiveReferenceClone(T* p);
Definition at line 87 of file COWIntrusiveReference.hpp.
|
|||||
|
Definition at line 92 of file COWIntrusiveReference.hpp. |
|
|||||
|
Definition at line 90 of file COWIntrusiveReference.hpp. |
|
|||||
|
Definition at line 255 of file COWIntrusiveReference.hpp. |
|
|||||||||
|
Default constructor The underlying object pointer will be NULL.
Definition at line 98 of file COWIntrusiveReference.hpp. |
|
||||||||||||||||
|
Construct a COWIntrusiveReference that will contain a pointer to a COWIntrusiveCountableBase object.
Definition at line 108 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
||||||||||||||
|
Copy constructor. This takes a COWIntrusiveReference of a type derived from T. This constructor will cause this COWIntrusiveReference object to share the same underlying COWIntrusiveCountableBase pointer with another. This will cause the reference count to get incremented on the underlying object.
Definition at line 122 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
||||||||||
|
Copy constructor. This constructor will cause this COWIntrusiveReference object to share the same underlying COWIntrusiveCountableBase pointer with another. This will cause the reference count to get incremented on the underlying object.
Definition at line 134 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Destroy this COWIntrusiveReference. If the reference count to the underlying COWIntrusiveCountableBase object is zero after it is decremented in this method it will be deleted. Definition at line 143 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Definition at line 196 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. Referenced by BLOCXX_NAMESPACE::operator!=(), and BLOCXX_NAMESPACE::operator==(). |
|
|||||||||
|
Create a clone of the COWIntrusiveCountableBase object if there is more than one reference to it. This method is used to support the copy on write functionality. Definition at line 289 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. Referenced by BLOCXX_NAMESPACE::COWIntrusiveReference< T >::operator *(), and BLOCXX_NAMESPACE::COWIntrusiveReference< T >::operator->(). |
|
|||||||||
|
Definition at line 231 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReferenceHelpers::checkNull(), BLOCXX_NAMESPACE::COWIntrusiveReference< T >::getWriteLock(), and BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Definition at line 205 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReferenceHelpers::checkNull(), and BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Definition at line 256 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Negation operator.
Definition at line 266 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Definition at line 245 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReferenceHelpers::checkNull(), BLOCXX_NAMESPACE::COWIntrusiveReference< T >::getWriteLock(), and BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
|||||||||
|
Definition at line 218 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReferenceHelpers::checkNull(), and BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. |
|
||||||||||
|
Assignment operator. This changes the underlying COWIntrusiveCountableBase pointer to the one passed to this method.
Definition at line 187 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::swap(). |
|
||||||||||
|
Assignment operator. This method will cause this COWIntrusiveReference object to share the same underlying COWIntrusiveCountableBase pointer with another. This will cause the reference count to get incremented on the underlying object.
Definition at line 174 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::swap(). |
|
||||||||||||||
|
Assignment operator that that takes a COWIntrusiveReference of a type derived from T. This method will cause this COWIntrusiveReference object to share the same underlying COWIntrusiveCountableBase pointer with another. This will cause the reference count to get incremented on the underlying object.
Definition at line 159 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::swap(). |
|
||||||||||
|
Definition at line 271 of file COWIntrusiveReference.hpp. References BLOCXX_NAMESPACE::COWIntrusiveReference< T >::m_pObj. Referenced by BLOCXX_NAMESPACE::COWIntrusiveReference< T >::operator=(), BLOCXX_NAMESPACE::String::swap(), and BLOCXX_NAMESPACE::swap(). |
|
|||||
|
Definition at line 280 of file COWIntrusiveReference.hpp. |
|
|||||
1.4.4