TRefHolder< T > Class Template Reference
Uncategorized

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
typedef std::shared_ptr< TRefHolder< T > > | Pointer
| pointer type of this reference holder.

## Public Member Functions

| operator const_reference ()
| returns the reference variable to allow seemless usage
| 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

  T | the 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 46 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 43 of file refholder.hh.

## Constructor & Destructor Documentation

## TRefHolder()

template<typename T>

TRefHolder< T >::TRefHolder | ( | const_reference | r | ) |

inline

Constructor

Parameters

  r | the const reference to be hold

Definition at line 52 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 56 of file refholder.hh.

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

- refholder.hh