LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions
LocARNA::type_wrapper< T > Class Template Reference

generic type_wrapper class More...

#include <type_wrapper.hh>

List of all members.

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
bool operator== (const type_wrapper &x) const
 equal
bool operator!= (const type_wrapper &x) const
 inequal
bool operator<= (const type_wrapper &x) const
 less equal
bool operator< (const type_wrapper &x) const
 less
bool operator>= (const type_wrapper &x) const
 greater equal
bool operator> (const type_wrapper &x) const
 greater
type_wrapper operator+ (const type_wrapper &x) const
 add
type_wrapper operator- (const type_wrapper &x) const
 subtract
type_wrapper operator+ (const T &x) const
 add
type_wrapper operator- (const T &x) const
 subtract
const type_wrapperoperator++ ()
 prefix increment
const type_wrapperoperator-- ()
 prefix decrement
const type_wrapperoperator++ (int)
 postfix increment
const type_wrapperoperator-- (int)
 postfix decrement

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:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends