# TMCCopyOnWritePtr< T > Class Template Reference

Inheritance diagram for TMCCopyOnWritePtr< T >:

List of all members.

## 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

## Detailed Description

### template<class T>
class TMCCopyOnWritePtr< T >

This class is used to create "Copy on Write" caches. This is used to avoid making multiple copies of identical data

## Constructor & Destructor Documentation

template<class T >

TMCCopyOnWritePtr< T >::TMCCopyOnWritePtr | ( |  | ) | `[inline]`

template<class T >

TMCCopyOnWritePtr< T >::TMCCopyOnWritePtr | ( | const TMCCopyOnWritePtr< T > & | ptr | ) | `[inline]`

## Member Function Documentation

template<class T >

void TMCCopyOnWritePtr< T >::Allocate | ( |  | ) | `[inline]`

Allocates the object.

template<class T >

const T * TMCCopyOnWritePtr< T >::GetPointerForRead | ( |  | ) | `[inline]`

Returns a pointer that does not let you modify the data.

template<class T >

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).

template<class T >

void TMCCopyOnWritePtr< T >::operator= | ( | const TMCCopyOnWritePtr< T > & | ptr | ) | `[inline]`

template<class T >

void TMCCopyOnWritePtr< T >::Release | ( |  | ) | `[inline]`

## Member Data Documentation

template<class T >

TMCCountedPtr< T > TMCCopyOnWritePtr< T >::fPtr`[protected]`

The documentation for this class was generated from the following file:

- MCCopyOnWritePtr.h