45 #define EXPOSED_VECTOR_INTERFACE(InnerElement) \
46 using ExpVec = ExposedVector< InnerElement >; \
47 using ExpVec::ExposedVector; \
48 using value_type = typename ExpVec::value_type; \
49 using iterator = typename ExpVec::iterator; \
50 using const_iterator = typename ExpVec::const_iterator; \
51 using reverse_iterator = typename ExpVec::reverse_iterator; \
52 using const_reverse_iterator = typename ExpVec::const_reverse_iterator; \
53 using size_type = typename ExpVec::size_type; \
54 using pointer = typename ExpVec::pointer; \
55 using reference = typename ExpVec::reference; \
56 using const_reference = typename ExpVec::const_reference; \
57 using difference_type = typename ExpVec::difference_type; \
79 template<
class VectorElement>
92 using pointer =
typename VecMember::pointer;
125 return data_.begin();
133 return data_.begin();
141 return data_.cbegin();
153 data_.resize(new_size);
157 data_.reserve(new_size);
161 return data_.empty();
171 VectorElement&
at(
size_t i)
175 const VectorElement&
at(
size_t i)
const
183 const VectorElement&
back() const noexcept
193 data_.push_back(std::move(f));
195 template<
typename...
Args>
198 return data_.emplace_back(std::forward<Args>(args)...);
206 return data_.erase(where);
210 return data_.erase(from, to);
215 return data_.insert(where, from, to);
Makes a vector<VectorElement> available in the derived class and exposed commonly used vector member ...
Definition: ExposedVector.h:81
iterator insert(const_iterator where, T from, T to)
Definition: ExposedVector.h:213
std::vector< VectorElement > VecMember
Definition: ExposedVector.h:83
typename VecMember::iterator iterator
Definition: ExposedVector.h:87
const_iterator begin() const noexcept
Definition: ExposedVector.h:131
typename VecMember::const_iterator const_iterator
Definition: ExposedVector.h:88
void reserve(const size_t new_size)
Definition: ExposedVector.h:155
typename VecMember::pointer pointer
Definition: ExposedVector.h:92
size_t size() const noexcept
Definition: ExposedVector.h:147
bool empty() const noexcept
Definition: ExposedVector.h:159
ExposedVector(const size_t n)
Definition: ExposedVector.h:102
decltype(auto) emplace_back(Args &&... args)
Definition: ExposedVector.h:196
typename VecMember::size_type size_type
Definition: ExposedVector.h:91
VectorElement & back() noexcept
Definition: ExposedVector.h:179
typename VecMember::value_type value_type
Definition: ExposedVector.h:86
const_iterator end() const noexcept
Definition: ExposedVector.h:135
typename VecMember::reverse_iterator reverse_iterator
Definition: ExposedVector.h:89
typename VecMember::const_reference const_reference
Definition: ExposedVector.h:94
ExposedVector(ExposedVector &&rhs) noexcept=default
Move C'tor.
const VectorElement & back() const noexcept
Definition: ExposedVector.h:183
typename VecMember::difference_type difference_type
Definition: ExposedVector.h:95
VecMember data_
the container which holds all the data
Definition: ExposedVector.h:98
ExposedVector & operator=(ExposedVector &&rhs) noexcept=default
Move Assignment.
const VectorElement & operator[](size_t i) const noexcept
Definition: ExposedVector.h:167
void pop_back() noexcept
Definition: ExposedVector.h:200
iterator begin() noexcept
Definition: ExposedVector.h:123
const_iterator cend() const noexcept
Definition: ExposedVector.h:143
void resize(const size_t new_size)
Definition: ExposedVector.h:151
void push_back(VectorElement &&f)
Definition: ExposedVector.h:191
ExposedVector & operator=(const ExposedVector &rhs)=default
Assignment.
VectorElement & at(size_t i)
Definition: ExposedVector.h:171
typename VecMember::reference reference
Definition: ExposedVector.h:93
VectorElement & operator[](size_t i) noexcept
Definition: ExposedVector.h:163
const VectorElement & at(size_t i) const
Definition: ExposedVector.h:175
ExposedVector(const size_t n, const VectorElement &val)
Definition: ExposedVector.h:106
const_iterator cbegin() const noexcept
Definition: ExposedVector.h:139
void push_back(const VectorElement &f)
Definition: ExposedVector.h:187
VecMember & getData()
read access to the underlying data
Definition: ExposedVector.h:224
ExposedVector(const ExposedVector &rhs)=default
Copy C'tor.
ExposedVector(Iter begin, Iter end)
Definition: ExposedVector.h:109
typename VecMember::const_reverse_iterator const_reverse_iterator
Definition: ExposedVector.h:90
const VecMember & getData() const
read-only access to the underlying data
Definition: ExposedVector.h:219
iterator erase(const_iterator where) noexcept
Definition: ExposedVector.h:204
iterator erase(const_iterator from, const_iterator to) noexcept
Definition: ExposedVector.h:208
iterator end() noexcept
Definition: ExposedVector.h:127
custom arguments to allow for looping calls
Definition: WizardHelper.h:73
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48