All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
lar::sparse_vector< T >::reference Class Reference

A class representing a cell in a sparse vector. More...

#include <sparse_vector.h>

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

Public Member Functions

 reference (value_type *pValue=0)
 
 reference (value_type &value)
 
referenceoperator= (const reference &)=default
 
value_typeoperator= (value_type v)
 
 operator value_type & ()
 
- Public Member Functions inherited from lar::sparse_vector< T >::const_reference
 const_reference (const value_type *pValue=0)
 
 const_reference (const value_type &value)
 
 operator value_type () const
 
 operator const value_type & () const
 

Protected Member Functions

 reference (const const_reference &from)
 

Friends

class iterator
 

Additional Inherited Members

- Protected Attributes inherited from lar::sparse_vector< T >::const_reference
const value_typeptr
 

Detailed Description

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

A class representing a cell in a sparse vector.

This class is a little box allowing assignment of values into it; if the internal pointer is invalid (as in case of void cell), dereferencing or assigning will provoke a segmentation fault.

Definition at line 1404 of file sparse_vector.h.

Constructor & Destructor Documentation

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

Definition at line 1412 of file sparse_vector.h.

1412 : const_reference(pValue) {}
const_reference(const value_type *pValue=0)
template<typename T>
lar::sparse_vector< T >::reference::reference ( value_type value)
inline

Definition at line 1413 of file sparse_vector.h.

1413 : reference(&value) {}
reference(value_type *pValue=0)
temporary value
template<typename T>
lar::sparse_vector< T >::reference::reference ( const const_reference from)
inlineexplicitprotected

Definition at line 1423 of file sparse_vector.h.

1423 : const_reference(from) {}
const_reference(const value_type *pValue=0)

Member Function Documentation

template<typename T>
lar::sparse_vector< T >::reference::operator value_type & ( )
inlineexplicit

Definition at line 1419 of file sparse_vector.h.

1420  { return const_cast<value_type&>(*const_reference::ptr); }
T value_type
type of the stored values
template<typename T>
reference& lar::sparse_vector< T >::reference::operator= ( const reference )
default
template<typename T>
value_type& lar::sparse_vector< T >::reference::operator= ( value_type  v)
inline

Definition at line 1416 of file sparse_vector.h.

1417  { return const_cast<value_type&>(*const_reference::ptr) = v; }
T value_type
type of the stored values

Friends And Related Function Documentation

template<typename T>
friend class iterator
friend

Definition at line 1405 of file sparse_vector.h.


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