base::UniqueFactory< T > Class Template Reference

Factory that destroys duplicate objects and returns unique ones. More...

#include <base_unique_ptr.hh>

Inheritance diagram for base::UniqueFactory< T >:

base::Threadable

List of all members.

Public Member Functions

 UniqueFactory (void)
 ~UniqueFactory ()
SafePtr< const T > Substitute (const T *obj)
SafePtr< const T > Substitute (const T &obj)
uint GetCnt (void) const

Private Attributes

set< T > mSet


Detailed Description

template<typename T>
class base::UniqueFactory< T >

Factory that destroys duplicate objects and returns unique ones.

The unique object must be const. If it was allowed to be modified, it might be turned into a duplicate.

Must be thread-safe as UniqueFactory is expected to be shared by threads.


Constructor & Destructor Documentation

template<typename T>
base::UniqueFactory< T >::UniqueFactory ( void   )  [inline]

template<typename T>
base::UniqueFactory< T >::~UniqueFactory (  )  [inline]


Member Function Documentation

template<typename T>
SafePtr<const T> base::UniqueFactory< T >::Substitute ( const T *  obj  )  [inline]

template<typename T>
SafePtr<const T> base::UniqueFactory< T >::Substitute ( const T &  obj  )  [inline]

template<typename T>
uint base::UniqueFactory< T >::GetCnt ( void   )  const [inline]


Member Data Documentation

template<typename T>
set<T> base::UniqueFactory< T >::mSet [private]


The documentation for this class was generated from the following file: Palomino 3D Engine documents generated by doxygen 1.5.3 on Fri Nov 23 11:26:20 2007