LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
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
 Conversion to the basic type: always returns the stored value. More...
 

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

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

Definition at line 59 of file sparse_vector.h.

References lar::const_value_box< T >::value.

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.

References lar::const_value_box< T >::value.

Referenced by lar::sparse_vector< T >::reference::reference(), and lar::sparse_vector< float >::sparse_vector().

54 { return *this; }

Member Data Documentation


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