TRefHolder< T > Class Template Reference

Template implementation of RefHolder. More...

#include <Component/ModelParamBase.H>

Inheritance diagram for TRefHolder< T >:
Inheritance graph
[legend]
Collaboration diagram for TRefHolder< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TRefHolder (T &r)
virtual const std::type_info & type () const

Public Attributes

T & ref

Detailed Description

template<class T>
class TRefHolder< T >

Template implementation of RefHolder.

Essentially this class just provides a way to dynamic_cast to any type. We do this by wrapping the type in a TRefHolder, which is dynamic_cast-able by virtue of having a virtual function. Thus we can construct for example a TRefHolder<int>, pass it somewhere as a RefHolder, and then somewhen can later dynamic_cast it back to a TRefHolder<int> and get the original int& back out.

Definition at line 72 of file ModelParamBase.H.


The documentation for this class was generated from the following file:
Generated on Sun May 8 08:43:50 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3