Public Member Functions | Private Attributes
rgrl_const_cast< ToType > Class Template Reference

Cast down the hierarchy. More...

#include <rgrl_cast.h>

List of all members.

Public Member Functions

 rgrl_const_cast (rgrl_feature_sptr const &feature)
 Downcast a feature object.
 rgrl_const_cast (rgrl_feature_set_sptr const &feature_set)
 Downcast a feature object.
 rgrl_const_cast (rgrl_transformation_sptr const &trans)
 Downcast a transformation object.
 rgrl_const_cast (rgrl_converge_status_sptr const &status)
 Downcast a convergence status object.
 rgrl_const_cast (rgrl_invariant_sptr const &invariant)
 Downcast an invariant feature object.
 operator const ToType () const
const ToType operator-> () const

Private Attributes

void * ptr

Detailed Description

template<typename ToType>
class rgrl_const_cast< ToType >

Cast down the hierarchy.

This does a dynamic_cast and then asserts that the result is not null. Therefore, you are guaranteed that the result is a valid pointer, or else the program will halt.

Example of usage:

Definition at line 104 of file rgrl_cast.h.


Constructor & Destructor Documentation

template<typename ToType >
rgrl_const_cast< ToType >::rgrl_const_cast ( rgrl_feature_sptr const &  feature) [inline]

Downcast a feature object.

Definition at line 108 of file rgrl_cast.h.

template<typename ToType >
rgrl_const_cast< ToType >::rgrl_const_cast ( rgrl_feature_set_sptr const &  feature_set) [inline]

Downcast a feature object.

Definition at line 115 of file rgrl_cast.h.

template<typename ToType >
rgrl_const_cast< ToType >::rgrl_const_cast ( rgrl_transformation_sptr const &  trans) [inline]

Downcast a transformation object.

Definition at line 122 of file rgrl_cast.h.

template<typename ToType >
rgrl_const_cast< ToType >::rgrl_const_cast ( rgrl_converge_status_sptr const &  status) [inline]

Downcast a convergence status object.

Definition at line 129 of file rgrl_cast.h.

template<typename ToType >
rgrl_const_cast< ToType >::rgrl_const_cast ( rgrl_invariant_sptr const &  invariant) [inline]

Downcast an invariant feature object.

Definition at line 136 of file rgrl_cast.h.


Member Function Documentation

template<typename ToType >
rgrl_const_cast< ToType >::operator const ToType ( ) const [inline]

Definition at line 143 of file rgrl_cast.h.

template<typename ToType >
const ToType rgrl_const_cast< ToType >::operator-> ( ) const [inline]

Definition at line 149 of file rgrl_cast.h.


Member Data Documentation

template<typename ToType >
void* rgrl_const_cast< ToType >::ptr [private]

Definition at line 155 of file rgrl_cast.h.


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