Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Member Functions | Private Attributes | List of all members
SparseVector< Value >::ValueProxy Class Reference

class ValueProxy allows the SparseVector to differentiate between writing and reading, so zeros can be ignored See "more effective c++" section 30 More...

#include <OpenMS/DATASTRUCTURES/SparseVector.h>

Public Member Functions

 ValueProxy (SparseVector &vec, size_type index)
 public constructor More...
 
 operator double () const
 cast operator for implicit casting in case of reading in the vector More...
 
 operator int () const
 cast operator for implicit casting in case of reading in the vector More...
 
 operator float () const
 cast operator for implicit casting in case of reading in the vector More...
 
ValueProxyoperator= (const ValueProxy &rhs)
 assignment operator, ditches the sparse elements More...
 
ValueProxyoperator= (Value val)
 assignment operator, ditches the sparse elements More...
 
bool operator!= (const ValueProxy &other)
 inequality operator More...
 
bool operator== (const ValueProxy &other)
 equality operator More...
 
bool operator< (const ValueProxy &other)
 less than operator More...
 
bool operator> (const ValueProxy &other)
 greater than operator More...
 
bool operator<= (const ValueProxy &other)
 less or equal than operator More...
 
bool operator>= (const ValueProxy &other)
 greater or equal than operator More...
 

Private Attributes

SparseVectorvec_
 the referring SparseVector More...
 
size_type index_
 the reference into the SparseVector More...
 

Detailed Description

template<typename Value>
class OpenMS::SparseVector< Value >::ValueProxy

class ValueProxy allows the SparseVector to differentiate between writing and reading, so zeros can be ignored See "more effective c++" section 30

Constructor & Destructor Documentation

◆ ValueProxy()

ValueProxy ( SparseVector vec,
size_type  index 
)
inline

Member Function Documentation

◆ operator double()

operator double ( ) const
inline

◆ operator float()

operator float ( ) const
inline

◆ operator int()

operator int ( ) const
inline

◆ operator!=()

bool operator!= ( const ValueProxy other)
inline

◆ operator<()

bool operator< ( const ValueProxy other)
inline

less than operator

◆ operator<=()

bool operator<= ( const ValueProxy other)
inline

less or equal than operator

◆ operator=() [1/2]

ValueProxy& operator= ( const ValueProxy rhs)
inline

◆ operator=() [2/2]

ValueProxy& operator= ( Value  val)
inline

◆ operator==()

bool operator== ( const ValueProxy other)
inline

equality operator

◆ operator>()

bool operator> ( const ValueProxy other)
inline

greater than operator

◆ operator>=()

bool operator>= ( const ValueProxy other)
inline

greater or equal than operator

Member Data Documentation

◆ index_

size_type index_
private

◆ vec_

SparseVector& vec_
private

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:12 using doxygen 1.8.13