Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ONE::util::ReferenceCounting< Ptr > Class Template Reference

Inheritance diagram for ONE::util::ReferenceCounting< Ptr >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename Ptr>
class ONE::util::ReferenceCounting< Ptr >

reference counting ownership policy

This policy keeps track of its replications. The SmartPointer deletes the pointer once the reference count reaches zero.

Note:
this class is based on the SmartPtr implementation presented in "Modern C++ Design" by Andrei Alexandrescu
Author:
Daniel Seibert


Protected Types

enum  { OWNERSHIP_TRANSFER = false }

Protected Member Functions

Ptr clone (const Ptr &obj)
template<typename U>
 ReferenceCounting (const ReferenceCounting< U > &rc)
 ReferenceCounting ()
bool release (const Ptr &)
void swap (ReferenceCounting &rc)

Friends

unsigned int getReferenceCount (const ReferenceCounting &rc)
class ReferenceCounting


Member Enumeration Documentation

template<typename Ptr>
anonymous enum [protected]
 

Enumerator:
OWNERSHIP_TRANSFER 


Constructor & Destructor Documentation

template<typename Ptr>
ONE::util::ReferenceCounting< Ptr >::ReferenceCounting  )  [inline, protected]
 

template<typename Ptr>
template<typename U>
ONE::util::ReferenceCounting< Ptr >::ReferenceCounting const ReferenceCounting< U > &  rc  )  [inline, protected]
 


Member Function Documentation

template<typename Ptr>
Ptr ONE::util::ReferenceCounting< Ptr >::clone const Ptr &  obj  )  [inline, protected]
 

template<typename Ptr>
bool ONE::util::ReferenceCounting< Ptr >::release const Ptr &   )  [inline, protected]
 

template<typename Ptr>
void ONE::util::ReferenceCounting< Ptr >::swap ReferenceCounting< Ptr > &  rc  )  [inline, protected]
 


Friends And Related Function Documentation

template<typename Ptr>
unsigned int getReferenceCount const ReferenceCounting< Ptr > &  rc  )  [friend]
 

template<typename Ptr>
friend class ReferenceCounting [friend]
 


Generated on Wed Sep 7 19:03:32 2005 for ONEngine by  doxygen 1.4.3