LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
lar::sparse_vector< T >::const_reference Class Reference

Special little box to allow void elements to be treated as references. More...

#include "sparse_vector.h"

Inheritance diagram for lar::sparse_vector< T >::const_reference:
lar::sparse_vector< T >::reference

Public Member Functions

 const_reference (const value_type *pValue=0)
 
 const_reference (const value_type &value)
 
 operator value_type () const
 
 operator const value_type & () const
 

Protected Attributes

const value_typeptr
 

Detailed Description

template<typename T>
class lar::sparse_vector< T >::const_reference

Special little box to allow void elements to be treated as references.

Definition at line 1415 of file sparse_vector.h.

Constructor & Destructor Documentation

template<typename T>
lar::sparse_vector< T >::const_reference::const_reference ( const value_type pValue = 0)
inline

Definition at line 1420 of file sparse_vector.h.

1420 : ptr(pValue) {}
template<typename T>
lar::sparse_vector< T >::const_reference::const_reference ( const value_type value)
inline

Definition at line 1421 of file sparse_vector.h.

1421 : const_reference(&value) {}
const_reference(const value_type *pValue=0)
double value
Definition: spectrum.C:18

Member Function Documentation

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

Definition at line 1424 of file sparse_vector.h.

1424 { return ptr ? *ptr : value_zero; }
static constexpr value_type value_zero
a representation of 0
template<typename T>
lar::sparse_vector< T >::const_reference::operator value_type ( ) const
inlineexplicit

Definition at line 1423 of file sparse_vector.h.

1423 { return ptr ? *ptr : value_zero; }
static constexpr value_type value_zero
a representation of 0

Member Data Documentation

template<typename T>
const value_type* lar::sparse_vector< T >::const_reference::ptr
protected

Definition at line 1417 of file sparse_vector.h.


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