Simbody
Public Member Functions

SimTK::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

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

Member Function Documentation

template<class T >
Concretize& SimTK::Concretize< T >::operator= ( const Concretize< T > &  c) [inline]
template<class T >
Concretize& SimTK::Concretize< T >::operator= ( const T &  t) [inline]
template<class T >
Concretize& SimTK::Concretize< T >::operator= ( T *  tp) [inline]
template<class T >
bool SimTK::Concretize< T >::operator== ( const Concretize< T > &  c) const [inline]
template<class T >
bool SimTK::Concretize< T >::operator!= ( const Concretize< T > &  c) const [inline]
template<class T >
const T* SimTK::Concretize< T >::operator-> ( ) const [inline]
template<class T >
T* SimTK::Concretize< T >::operator-> ( ) [inline]
template<class T >
SimTK::Concretize< T >::operator const T & ( ) const [inline]

implicit conversions

template<class T >
SimTK::Concretize< T >::operator T & ( ) [inline]
template<class T >
T& SimTK::Concretize< T >::updRef ( ) [inline]
template<class T >
const T& SimTK::Concretize< T >::getRef ( ) const [inline]
template<class T >
bool SimTK::Concretize< T >::isEmpty ( ) const [inline]
template<class T >
void SimTK::Concretize< T >::clear ( ) [inline]
template<class T >
T* SimTK::Concretize< T >::extract ( ) [inline]
template<class T >
void SimTK::Concretize< T >::replace ( T *  tp) [inline]
template<class T >
void SimTK::Concretize< T >::replace ( T **  tpp) [inline]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines