Concretize< T > Class Template Reference

Wrap a pointer to an abstract base class in a way that makes it behave like a concrete class (sometimes called a "ClonePtr"). More...

#include <Concretize.h>

List of all members.

Public Member Functions

 Concretize ()
 Concretize (T *obj)
 Concretize (T **obj)
 Concretize (const T *obj)
 Concretize (const T &obj)
 Concretize (const Concretize &c)
Concretizeoperator= (const Concretize &c)
Concretizeoperator= (const T &t)
Concretizeoperator= (T *tp)
 ~Concretize ()
bool operator== (const Concretize &c) const
bool operator!= (const Concretize &c) const
const T * operator-> () const
T * operator-> ()
 operator const T & () const
 implicit conversions
 operator T & ()
T & updRef ()
const T & getRef () const
bool isEmpty () const
void clear ()
T * extract ()
void replace (T *tp)
void replace (T **tpp)

Detailed Description

template<class T>
class SimTK::Concretize< T >

Wrap a pointer to an abstract base class in a way that makes it behave like a concrete class (sometimes called a "ClonePtr").

The abstract base class must cooperate by containing a clone() method which returns a pointer to a copy of the concrete object.

The Concretize object normally makes a copy of the object passed to its constructor. However, if you pass it a non-const pointer Concretize will steal it and (if possible) return your pointer null just to be tidy.


Constructor & Destructor Documentation

Concretize (  )  [inline]
Concretize ( T *  obj  )  [inline, explicit]
Concretize ( T **  obj  )  [inline, explicit]
Concretize ( const T *  obj  )  [inline, explicit]
Concretize ( const T &  obj  )  [inline, explicit]
Concretize ( const Concretize< T > &  c  )  [inline]
~Concretize (  )  [inline]

Member Function Documentation

void clear (  )  [inline]
T* extract (  )  [inline]
const T& getRef (  )  const [inline]
bool isEmpty (  )  const [inline]
operator const T & (  )  const [inline]

implicit conversions

operator T & (  )  [inline]
bool operator!= ( const Concretize< T > &  c  )  const [inline]
T* operator-> (  )  [inline]
const T* operator-> (  )  const [inline]
Concretize& operator= ( T *  tp  )  [inline]
Concretize& operator= ( const T &  t  )  [inline]
Concretize& operator= ( const Concretize< T > &  c  )  [inline]
bool operator== ( const Concretize< T > &  c  )  const [inline]
void replace ( T **  tpp  )  [inline]
void replace ( T *  tp  )  [inline]
T& updRef (  )  [inline]

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

Generated on Thu Aug 12 16:38:16 2010 for SimTKcore by  doxygen 1.6.1