Public Types | Public Member Functions | Protected Attributes | Private Types | List of all members
lar::const_value_box< T > Class Template Reference

Little class storing a value. More...

#include <sparse_vector.h>

Public Types

typedef T value_type
 type of the value stored More...
 

Public Member Functions

 const_value_box ()
 Default constructor: stores default value. More...
 
 const_value_box (value_type new_value)
 Constructor: stores the specified value. More...
 
this_toperator= (value_type)
 Assignment: the assigned value is ignored. More...
 
 operator value_type () const
 Conversion to the basic type: always returns the stored value. More...
 
 operator const value_type & () const
 

Protected Attributes

value_type value
 the value stored for delivery More...
 

Private Types

typedef const_value_box< T > this_t
 

Detailed Description

template<typename T>
class lar::const_value_box< T >

Little class storing a value.

Template Parameters
Ttype of the stored value

This class stores a constant value and returns it as conversion to type T. It also acts as a left-value of type T, except that the assigned value is ignored.

Definition at line 42 of file sparse_vector.h.

Member Typedef Documentation

template<typename T >
typedef const_value_box<T> lar::const_value_box< T >::this_t
private

Definition at line 43 of file sparse_vector.h.

template<typename T >
typedef T lar::const_value_box< T >::value_type

type of the value stored

Definition at line 45 of file sparse_vector.h.

Constructor & Destructor Documentation

template<typename T >
lar::const_value_box< T >::const_value_box ( )
inline

Default constructor: stores default value.

Definition at line 48 of file sparse_vector.h.

48 {}
template<typename T >
lar::const_value_box< T >::const_value_box ( value_type  new_value)
inlineexplicit

Constructor: stores the specified value.

Definition at line 51 of file sparse_vector.h.

51 : value(new_value) {}
value_type value
the value stored for delivery
Definition: sparse_vector.h:63

Member Function Documentation

template<typename T >
lar::const_value_box< T >::operator const value_type & ( ) const
inline

Definition at line 59 of file sparse_vector.h.

59 { return value; }
value_type value
the value stored for delivery
Definition: sparse_vector.h:63
template<typename T >
lar::const_value_box< T >::operator value_type ( ) const
inline

Conversion to the basic type: always returns the stored value.

Definition at line 58 of file sparse_vector.h.

58 { return value; }
value_type value
the value stored for delivery
Definition: sparse_vector.h:63
template<typename T >
this_t& lar::const_value_box< T >::operator= ( value_type  )
inline

Assignment: the assigned value is ignored.

Definition at line 54 of file sparse_vector.h.

54 { return *this; }

Member Data Documentation

template<typename T >
value_type lar::const_value_box< T >::value
protected

the value stored for delivery

Definition at line 63 of file sparse_vector.h.


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