UT_COWHandle< Data > Class Template Reference

#include <UT_COW.h>

List of all members.

Public Member Functions

 UT_COWHandle ()
virtual ~UT_COWHandle ()
 UT_COWHandle (const UT_COWHandle< Data > &src)
const UT_COWHandle< Data > & operator= (const UT_COWHandle< Data > &src)
void allocate ()
 Calls the default constructor on the object.
void copy (Data *src)
void steal (Data *src)
void resetHandle ()

Friends

class UT_COWReadHandle
 Grant our friends direct access.
class UT_COWWriteHandle


Detailed Description

template<typename Data>
class UT_COWHandle< Data >

A plain handle is an opaque refernce to the data. You can't read or write to it with this sort of handle, but you can copy and store it. Assign a plain handle into a ReadHandle or a WriteHandle to gain more privelages.

Definition at line 55 of file UT_COW.h.


Constructor & Destructor Documentation

template<typename Data>
UT_COWHandle< Data >::UT_COWHandle (  )  [inline]

Definition at line 58 of file UT_COW.h.

template<typename Data>
virtual UT_COWHandle< Data >::~UT_COWHandle (  )  [inline, virtual]

Definition at line 64 of file UT_COW.h.

template<typename Data>
UT_COWHandle< Data >::UT_COWHandle ( const UT_COWHandle< Data > &  src  )  [inline]

Definition at line 70 of file UT_COW.h.


Member Function Documentation

template<typename Data>
void UT_COWHandle< Data >::allocate (  )  [inline]

Calls the default constructor on the object.

Definition at line 89 of file UT_COW.h.

template<typename Data>
void UT_COWHandle< Data >::copy ( Data *  src  )  [inline]

Makes a copy of the source data. This is the safest approach as the caller will retain ownership.

Definition at line 97 of file UT_COW.h.

template<typename Data>
const UT_COWHandle<Data>& UT_COWHandle< Data >::operator= ( const UT_COWHandle< Data > &  src  )  [inline]

Definition at line 76 of file UT_COW.h.

template<typename Data>
void UT_COWHandle< Data >::resetHandle (  )  [inline]

Turns us into a null pointer, a useful way to end our use of a handle without having to play weird scope games.

Definition at line 115 of file UT_COW.h.

template<typename Data>
void UT_COWHandle< Data >::steal ( Data *  src  )  [inline]

Be careful when initializing using this function. The handle will gain ownership of the provided pointer, so the caller should cease referring to it.

Definition at line 107 of file UT_COW.h.


Friends And Related Function Documentation

template<typename Data>
friend class UT_COWReadHandle [friend]

Grant our friends direct access.

Definition at line 146 of file UT_COW.h.

template<typename Data>
friend class UT_COWWriteHandle [friend]

Definition at line 147 of file UT_COW.h.


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

Generated on Fri May 25 00:10:46 2012 for HDK by  doxygen 1.5.9