ATLAS Offline Software
Public Types | Private Types | Static Private Attributes | List of all members
type_tools::Parameter< T > Class Template Reference

an algorithm to provide an efficient way to pass a parameter: by value for scalars (arithmetic types and pointers), by reference for compound objects.Derived from Loki library More...

#include <type_tools.h>

Collaboration diagram for type_tools::Parameter< T >:

Public Types

typedef std::conditional< s_isScalar, T, TRef >::type ref_type
 
typedef std::conditional< s_isScalar, T, const T & >::type const_type
 
typedef std::conditional< s_isScalar, T, T * >::type ptr_type
 
typedef const_type type
 

Private Types

typedef std::add_lvalue_reference< T >::type TRef
 
typedef const TRef const_TRef
 

Static Private Attributes

static const bool s_isScalar = std::is_scalar<T>::value
 

Detailed Description

template<typename T>
class type_tools::Parameter< T >

an algorithm to provide an efficient way to pass a parameter: by value for scalars (arithmetic types and pointers), by reference for compound objects.Derived from Loki library

Author
Paolo Calafiura

Definition at line 30 of file type_tools.h.

Member Typedef Documentation

◆ const_TRef

template<typename T >
typedef const TRef type_tools::Parameter< T >::const_TRef
private

Definition at line 33 of file type_tools.h.

◆ const_type

template<typename T >
typedef std::conditional<s_isScalar,T,const T&>::type type_tools::Parameter< T >::const_type

Definition at line 37 of file type_tools.h.

◆ ptr_type

template<typename T >
typedef std::conditional<s_isScalar,T,T*>::type type_tools::Parameter< T >::ptr_type

Definition at line 38 of file type_tools.h.

◆ ref_type

template<typename T >
typedef std::conditional<s_isScalar,T,TRef>::type type_tools::Parameter< T >::ref_type

Definition at line 36 of file type_tools.h.

◆ TRef

template<typename T >
typedef std::add_lvalue_reference<T>::type type_tools::Parameter< T >::TRef
private

Definition at line 32 of file type_tools.h.

◆ type

template<typename T >
typedef const_type type_tools::Parameter< T >::type

Definition at line 39 of file type_tools.h.

Member Data Documentation

◆ s_isScalar

template<typename T >
const bool type_tools::Parameter< T >::s_isScalar = std::is_scalar<T>::value
staticprivate

Definition at line 34 of file type_tools.h.


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