Public Member Functions | |
TMCCopyOnWritePtr () | |
TMCCopyOnWritePtr (const TMCCopyOnWritePtr< T > &ptr) | |
void | operator= (const TMCCopyOnWritePtr< T > &ptr) |
void | Allocate () |
Allocates the object. | |
void | Release () |
const T * | GetPointerForRead () |
Returns a pointer that does not let you modify the data. | |
T * | GetPointerForWrite () |
Protected Attributes | |
TMCCountedPtr< T > | fPtr |
This class is used to create "Copy on Write" caches. This is used to avoid making multiple copies of identical data
TMCCopyOnWritePtr< T >::TMCCopyOnWritePtr | ( | ) | [inline] |
TMCCopyOnWritePtr< T >::TMCCopyOnWritePtr | ( | const TMCCopyOnWritePtr< T > & | ptr | ) | [inline] |
void TMCCopyOnWritePtr< T >::Allocate | ( | ) | [inline] |
Allocates the object.
const T * TMCCopyOnWritePtr< T >::GetPointerForRead | ( | ) | [inline] |
Returns a pointer that does not let you modify the data.
T * TMCCopyOnWritePtr< T >::GetPointerForWrite | ( | ) | [inline] |
Returns a pointer that let's you modify the data (note that it might make a copy if others are referencing the same object).
void TMCCopyOnWritePtr< T >::operator= | ( | const TMCCopyOnWritePtr< T > & | ptr | ) | [inline] |
void TMCCopyOnWritePtr< T >::Release | ( | ) | [inline] |
TMCCountedPtr< T > TMCCopyOnWritePtr< T >::fPtr [protected] |