Concretize Class Template Reference

#include <Concretize.h>

List of all members.


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.

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)


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

Concretize& operator= ( const Concretize< T > &  c  )  [inline]

Concretize& operator= ( const T &  t  )  [inline]

References Concretize::replace().

Concretize& operator= ( T *  tp  )  [inline]

References Concretize::replace().

bool operator== ( const Concretize< T > &  c  )  const [inline]

References Concretize::getRef().

bool operator!= ( const Concretize< T > &  c  )  const [inline]

const T* operator-> (  )  const [inline]

T* operator-> (  )  [inline]

operator const T & (  )  const [inline]

implicit conversions

operator T & (  )  [inline]

T& updRef (  )  [inline]

const T& getRef (  )  const [inline]

Referenced by Concretize::operator==().

bool isEmpty (  )  const [inline]

void clear (  )  [inline]

References Concretize::replace().

T* extract (  )  [inline]

References C::T, and x.

void replace ( T *  tp  )  [inline]

void replace ( T **  tpp  )  [inline]


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

Generated on Fri Sep 26 07:44:29 2008 for SimTKcore by  doxygen 1.5.6