OpenMS
|
Makes a vector<VectorElement> available in the derived class and exposed commonly used vector member functions at class level. More...
#include <OpenMS/DATASTRUCTURES/ExposedVector.h>
Public Types | |
using | VecMember = std::vector< VectorElement > |
using | value_type = typename VecMember::value_type |
using | iterator = typename VecMember::iterator |
using | const_iterator = typename VecMember::const_iterator |
using | reverse_iterator = typename VecMember::reverse_iterator |
using | const_reverse_iterator = typename VecMember::const_reverse_iterator |
using | size_type = typename VecMember::size_type |
using | pointer = typename VecMember::pointer |
using | reference = typename VecMember::reference |
using | const_reference = typename VecMember::const_reference |
using | difference_type = typename VecMember::difference_type |
Public Member Functions | |
ExposedVector ()=default | |
ExposedVector (const size_t n) | |
ExposedVector (const size_t n, const VectorElement &val) | |
template<class Iter > | |
ExposedVector (Iter begin, Iter end) | |
ExposedVector (const ExposedVector &rhs)=default | |
Copy C'tor. More... | |
ExposedVector (ExposedVector &&rhs) noexcept=default | |
Move C'tor. More... | |
ExposedVector & | operator= (const ExposedVector &rhs)=default |
Assignment. More... | |
ExposedVector & | operator= (ExposedVector &&rhs) noexcept=default |
Move Assignment. More... | |
iterator | begin () noexcept |
iterator | end () noexcept |
const_iterator | begin () const noexcept |
const_iterator | end () const noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
size_t | size () const noexcept |
void | resize (const size_t new_size) |
void | reserve (const size_t new_size) |
bool | empty () const noexcept |
VectorElement & | operator[] (size_t i) noexcept |
const VectorElement & | operator[] (size_t i) const noexcept |
VectorElement & | at (size_t i) |
const VectorElement & | at (size_t i) const |
VectorElement & | back () noexcept |
const VectorElement & | back () const noexcept |
void | push_back (const VectorElement &f) |
void | push_back (VectorElement &&f) |
template<typename... Args> | |
decltype(auto) | emplace_back (Args &&... args) |
void | pop_back () noexcept |
iterator | erase (const_iterator where) noexcept |
iterator | erase (const_iterator from, const_iterator to) noexcept |
template<typename T > | |
iterator | insert (const_iterator where, T from, T to) |
const VecMember & | getData () const |
read-only access to the underlying data More... | |
VecMember & | getData () |
read access to the underlying data More... | |
Protected Attributes | |
VecMember | data_ |
the container which holds all the data More... | |
Makes a vector<VectorElement> available in the derived class and exposed commonly used vector member functions at class level.
This saves writing repetitive code which forwards commonly used functions of a data member, e.g. 'data_.begin()' as a member function of the class. Also it makes private inheritance from vector<VectorElement> obsolete. The latter is problematic for many reasons (read up on 'prefer composition over inheritance'). In our case, even linking can be problematic with private inheritance once you require RTTI (which some tools do, e.g. softwipe).
To fully utilize this class (i.e. access the 'iterator' type), insert
in your derived class, where VectorElement
is identical to the template argument of ExposedVector, e.g. 'Feature' for FeatureMap.
using const_iterator = typename VecMember::const_iterator |
using const_reference = typename VecMember::const_reference |
using const_reverse_iterator = typename VecMember::const_reverse_iterator |
using difference_type = typename VecMember::difference_type |
using iterator = typename VecMember::iterator |
using pointer = typename VecMember::pointer |
using reference = typename VecMember::reference |
using reverse_iterator = typename VecMember::reverse_iterator |
using size_type = typename VecMember::size_type |
using value_type = typename VecMember::value_type |
using VecMember = std::vector<VectorElement> |
|
default |
|
inlineexplicit |
|
inline |
|
inline |
|
default |
Copy C'tor.
|
defaultnoexcept |
Move C'tor.
|
inline |
References ExposedVector< VectorElement >::data_.
|
inline |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
Referenced by ConfidenceScoring::scoreMap(), and PrecursorIonSelection::sortByTotalScore().
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inline |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
Referenced by FeatureFinderAlgorithm::setSeeds().
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
Referenced by ConfidenceScoring::scoreMap(), and PrecursorIonSelection::sortByTotalScore().
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inline |
read access to the underlying data
References ExposedVector< VectorElement >::data_.
|
inline |
read-only access to the underlying data
References ExposedVector< VectorElement >::data_.
|
inline |
References ExposedVector< VectorElement >::data_.
|
default |
Assignment.
|
defaultnoexcept |
Move Assignment.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
|
inline |
References ExposedVector< VectorElement >::data_.
Referenced by IsotopeWaveletTransform< PeakType >::mapSeeds2Features().
|
inline |
References ExposedVector< VectorElement >::data_.
|
inline |
References ExposedVector< VectorElement >::data_.
|
inline |
References ExposedVector< VectorElement >::data_.
|
inlinenoexcept |
References ExposedVector< VectorElement >::data_.
Referenced by ConfidenceScoring::scoreMap().
|
protected |
the container which holds all the data
Referenced by ExposedVector< VectorElement >::at(), ExposedVector< VectorElement >::back(), ExposedVector< VectorElement >::begin(), ExposedVector< VectorElement >::cbegin(), ExposedVector< VectorElement >::cend(), ExposedVector< VectorElement >::emplace_back(), ExposedVector< VectorElement >::empty(), ExposedVector< VectorElement >::end(), ExposedVector< VectorElement >::erase(), ExposedVector< VectorElement >::getData(), ExposedVector< VectorElement >::insert(), ExposedVector< VectorElement >::operator[](), ExposedVector< VectorElement >::pop_back(), ExposedVector< VectorElement >::push_back(), ExposedVector< VectorElement >::reserve(), ExposedVector< VectorElement >::resize(), and ExposedVector< VectorElement >::size().