TRefHolder< T > Class Template Reference

A class to make a const reference not so const. More...

#include <mia/core/refholder.hh>

Public Types

typedef const T & const_reference
 the type of the actual reference this class holds More...
 
typedef std::shared_ptr< TRefHolder< T > > Pointer
 pointer type of this reference holder. More...
 

Public Member Functions

 operator const_reference ()
 returns the reference variable to allow seemless usage More...
 
 TRefHolder (const_reference r)
 

Detailed Description

template<typename T>
class TRefHolder< T >

A class to make a const reference not so const.

This is a little hepler class to make it possible to change what a constant reference member variable points to after construction of a class.

Template Parameters
Tthe type a reference is used form

Definition at line 39 of file refholder.hh.

Member Typedef Documentation

◆ const_reference

template<typename T >
typedef const T& TRefHolder< T >::const_reference

the type of the actual reference this class holds

Definition at line 45 of file refholder.hh.

◆ Pointer

template<typename T >
typedef std::shared_ptr<TRefHolder<T> > TRefHolder< T >::Pointer

pointer type of this reference holder.

Definition at line 42 of file refholder.hh.

Constructor & Destructor Documentation

◆ TRefHolder()

template<typename T >
TRefHolder< T >::TRefHolder ( const_reference  r)
inline

Constructor

Parameters
rthe const reference to be hold

Definition at line 51 of file refholder.hh.

Member Function Documentation

◆ operator const_reference()

template<typename T >
TRefHolder< T >::operator const_reference ( )
inline

returns the reference variable to allow seemless usage

Definition at line 55 of file refholder.hh.

References NS_MIA_END.


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