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

Cast down the hierarchy. More...

#include <rgrl_cast.h>

List of all members.

Public Member Functions

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

Private Attributes

void * ptr

Detailed Description

template<typename ToType>
class rgrl_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 29 of file rgrl_cast.h.


Constructor & Destructor Documentation

template<typename ToType >
rgrl_cast< ToType >::rgrl_cast ( rgrl_feature_sptr  feature) [inline]

Downcast a feature object.

Definition at line 33 of file rgrl_cast.h.

template<typename ToType >
rgrl_cast< ToType >::rgrl_cast ( rgrl_feature_set_sptr  feature_set) [inline]

Downcast a feature object.

Definition at line 40 of file rgrl_cast.h.

template<typename ToType >
rgrl_cast< ToType >::rgrl_cast ( rgrl_transformation_sptr  trans) [inline]

Downcast a transformation object.

Definition at line 47 of file rgrl_cast.h.

template<typename ToType >
rgrl_cast< ToType >::rgrl_cast ( rgrl_converge_status_sptr  status) [inline]

Downcast a convergence status object.

Definition at line 54 of file rgrl_cast.h.

template<typename ToType >
rgrl_cast< ToType >::rgrl_cast ( rgrl_invariant_sptr  invariant) [inline]

Downcast an invariant feature object.

Definition at line 61 of file rgrl_cast.h.

template<typename ToType >
rgrl_cast< ToType >::rgrl_cast ( rgrl_mask_sptr  mask) [inline]

Downcast a mask object.

Definition at line 80 of file rgrl_cast.h.


Member Function Documentation

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

Definition at line 68 of file rgrl_cast.h.

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

Definition at line 74 of file rgrl_cast.h.


Member Data Documentation

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

Definition at line 87 of file rgrl_cast.h.


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