LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 39 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 40 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 43 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 46 of file sparse_vector.h.

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

Constructor: stores the specified value.

Definition at line 49 of file sparse_vector.h.

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

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 57 of file sparse_vector.h.

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

57 { return value; }
value_type value
the value stored for delivery
Definition: sparse_vector.h:61
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 56 of file sparse_vector.h.

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

Assignment: the assigned value is ignored.

Definition at line 52 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().

52 { return *this; }

Member Data Documentation


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