LocARNA-1.8.11
Public Member Functions | List of all members
LocARNA::type_wrapper< T > Class Template Reference

generic type_wrapper class More...

#include <type_wrapper.hh>

Public Member Functions

 type_wrapper ()
 default constructor
 
 type_wrapper (const T &i)
 conversion constructor
 
 type_wrapper (const type_wrapper &idx)
 copy constructor
 
const T & val () const
 casting to T More...
 
bool operator== (const type_wrapper &x) const
 equal More...
 
bool operator!= (const type_wrapper &x) const
 inequal More...
 
bool operator<= (const type_wrapper &x) const
 less equal More...
 
bool operator< (const type_wrapper &x) const
 less More...
 
bool operator>= (const type_wrapper &x) const
 greater equal More...
 
bool operator> (const type_wrapper &x) const
 greater More...
 
type_wrapper operator+ (const type_wrapper &x) const
 add More...
 
type_wrapper operator- (const type_wrapper &x) const
 subtract More...
 
type_wrapper operator+ (const T &x) const
 add More...
 
type_wrapper operator- (const T &x) const
 subtract More...
 
const type_wrapperoperator++ ()
 prefix increment More...
 
const type_wrapperoperator-- ()
 prefix decrement More...
 
const type_wrapperoperator++ (int)
 postfix increment More...
 
const type_wrapperoperator-- (int)
 postfix decrement More...
 

Detailed Description

template<class T>
class LocARNA::type_wrapper< T >

generic type_wrapper class

wrap a comparable type with +/- operations

Member Function Documentation

template<class T>
bool LocARNA::type_wrapper< T >::operator!= ( const type_wrapper< T > &  x) const
inline

inequal

Parameters
x
Returns
*this != x
template<class T>
type_wrapper LocARNA::type_wrapper< T >::operator+ ( const type_wrapper< T > &  x) const
inline

add

Parameters
x
Returns
*this + x
template<class T>
type_wrapper LocARNA::type_wrapper< T >::operator+ ( const T &  x) const
inline

add

Parameters
x
Returns
*this + x
template<class T>
const type_wrapper& LocARNA::type_wrapper< T >::operator++ ( )
inline

prefix increment

Returns
*this after increment
template<class T>
const type_wrapper& LocARNA::type_wrapper< T >::operator++ ( int  )
inline

postfix increment

Returns
*this before increment
template<class T>
type_wrapper LocARNA::type_wrapper< T >::operator- ( const type_wrapper< T > &  x) const
inline

subtract

Parameters
x
Returns
*this - x
template<class T>
type_wrapper LocARNA::type_wrapper< T >::operator- ( const T &  x) const
inline

subtract

Parameters
x
Returns
*this - x
template<class T>
const type_wrapper& LocARNA::type_wrapper< T >::operator-- ( )
inline

prefix decrement

Returns
*this after decrement
template<class T>
const type_wrapper& LocARNA::type_wrapper< T >::operator-- ( int  )
inline

postfix decrement

Returns
*this before decrement
template<class T>
bool LocARNA::type_wrapper< T >::operator< ( const type_wrapper< T > &  x) const
inline

less

Parameters
x
Returns
*this < x
template<class T>
bool LocARNA::type_wrapper< T >::operator<= ( const type_wrapper< T > &  x) const
inline

less equal

Parameters
x
Returns
*this <= x
template<class T>
bool LocARNA::type_wrapper< T >::operator== ( const type_wrapper< T > &  x) const
inline

equal

Parameters
x
Returns
*this == x
template<class T>
bool LocARNA::type_wrapper< T >::operator> ( const type_wrapper< T > &  x) const
inline

greater

Parameters
x
Returns
*this > x
template<class T>
bool LocARNA::type_wrapper< T >::operator>= ( const type_wrapper< T > &  x) const
inline

greater equal

Parameters
x
Returns
*this >= x
template<class T>
const T& LocARNA::type_wrapper< T >::val ( ) const
inline

casting to T

Note
We don't use explicit cast for compatibility, since this is available with c++0x only: explicit operator T() const {return val_;} instead we define this "named cast"

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