Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
ConstRefVector.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2013.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Erhan Kenar $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_DATASTRUCTURES_CONSTREFVECTOR_H
36 #define OPENMS_DATASTRUCTURES_CONSTREFVECTOR_H
37 
38 #include <OpenMS/config.h>
39 #include <OpenMS/CONCEPT/Types.h>
41 
42 #include <vector>
43 #include <typeinfo>
44 #include <algorithm>
45 
46 namespace OpenMS
47 {
48 
71  template <typename ContainerT>
73  {
74 public:
75 
77  template <class ValueT>
79  {
80  friend class ConstRefVector;
81 
82 public:
83  typedef ValueT ValueType;
85  typedef typename std::vector<ValueType *>::difference_type difference_type;
86  typedef const value_type & reference;
87  typedef const value_type * pointer;
88  typedef std::random_access_iterator_tag iterator_category;
89 
91  {
92  }
93 
94  ConstRefVectorConstIterator(const typename std::vector<ValueType *> * vec, unsigned int position)
95  {
96  vector_ = (typename std::vector<ValueType *> *)vec;
97  position_ = position;
98  }
99 
100  ConstRefVectorConstIterator(typename std::vector<ValueType *> * vec, unsigned int position)
101  {
102  vector_ = vec;
103  position_ = position;
104  }
105 
107  {
108  vector_ = it.vector_;
109  position_ = it.position_;
110  }
111 
113  {}
114 
116  {
117  if (this == &rhs) return *this;
118 
119  vector_ = rhs.vector_;
120  position_ = rhs.position_;
121 
122  return *this;
123  }
124 
125  bool operator<(const ConstRefVectorConstIterator & it) const
126  {
127  return position_ < it.position_;
128  }
129 
130  bool operator>(const ConstRefVectorConstIterator & it) const
131  {
132  return position_ > it.position_;
133  }
134 
136  {
137  return position_ < it.position_ || position_ == it.position_;
138  }
139 
141  {
142  return position_ > it.position_ || position_ == it.position_;
143  }
144 
146  {
147  return position_ == it.position_ && vector_ == it.vector_;
148  }
149 
151  {
152  return position_ != it.position_ || vector_ != it.vector_;
153  }
154 
156  {
157  position_ += 1;
158  return *this;
159  }
160 
162  {
163  ConstRefVectorConstIterator tmp(*this);
164  ++(*this);
165  return tmp;
166  }
167 
169  {
170  position_ -= 1;
171  return *this;
172  }
173 
175  {
176  ConstRefVectorConstIterator tmp(*this);
177  --(*this);
178  return tmp;
179  }
180 
182  {
183  ConstRefVectorConstIterator tmp(*this);
184  tmp.position_ -= n;
185  return tmp;
186  }
187 
189  {
190  ConstRefVectorConstIterator tmp(*this);
191  tmp.position_ += n;
192  return tmp;
193  }
194 
196  {
197  position_ += n;
198  return *this;
199  }
200 
202  {
203  position_ -= n;
204  return *this;
205  }
206 
208  {
209  return i1.position_ - i2.position_;
210  }
211 
213  {
215  tmp.position_ += n;
216  return tmp;
217  }
218 
220  {
221  return *((*vector_)[position_]);
222  }
223 
225  {
226  return (*vector_)[position_];
227  }
228 
230  {
231  return (*vector_)[position_];
232  }
233 
234 protected:
235 
236  typename std::vector<ValueType *> * vector_;
237  unsigned int position_;
238  };
239 
240 
242  template <class ValueT>
244  public ConstRefVectorConstIterator<ValueT>
245  {
246  friend class ConstRefVector;
247 
248 public:
249 
250  typedef ValueT ValueType;
253 
256 
257 
259  {
260  }
261 
262  ConstRefVectorIterator(typename std::vector<ValueType *> * vec, unsigned int position) :
263  ConstRefVectorConstIterator<ValueType>(vec, position)
264  {
265  }
266 
269  {
270  }
271 
273  {
274  }
275 
277  {
278  return *((*vector_)[position_]);
279  }
280 
282  {
283  return (*vector_)[position_];
284  }
285 
287  {
288  return (*vector_)[position_];
289  }
290 
292  {
294  return *this;
295  }
296 
298  {
299  ConstRefVectorIterator tmp(*this);
300  ++(*this);
301  return tmp;
302  }
303 
305  {
307  return *this;
308  }
309 
311  {
312  ConstRefVectorIterator tmp(*this);
313  --(*this);
314  return tmp;
315  }
316 
318  {
319  ConstRefVectorIterator tmp(*this);
320  tmp.position_ -= n;
321  return tmp;
322  }
323 
325  {
326  ConstRefVectorIterator tmp(*this);
327  tmp.position_ += n;
328  return tmp;
329  }
330 
332  {
333  ConstRefVectorIterator tmp(i);
334  tmp.position_ += n;
335  return tmp;
336  }
337 
339  {
341  return *this;
342  }
343 
345  {
347  return *this;
348  }
349 
351  {
352  unsigned int tmp = i1.position_;
353  i1.position_ = i2.position_;
354  i2.position_ = tmp;
355  }
356 
357  };
358 
359 
361 
362  typedef ContainerT ContainerType;
365  typedef typename ContainerType::value_type ValueType;
368  typedef std::reverse_iterator<Iterator> ReverseIterator;
369  typedef std::reverse_iterator<ConstIterator> ConstReverseIterator;
371 
373 
375  typedef typename ContainerType::size_type size_type;
376  typedef typename ContainerType::difference_type difference_type;
377  typedef typename ContainerType::reference reference;
378  typedef typename ContainerType::const_reference const_reference;
379  typedef typename ContainerType::pointer pointer;
385 
386 
388  void push_back(const ValueType & x)
389  {
390  const ValueType * element = &x;
391  vector_.push_back(element);
392  }
393 
395  void pop_back()
396  {
397  vector_.pop_back();
398  }
399 
401  size_type size() const
402  {
403  return vector_.size();
404  }
405 
408  {
409  return std::max(vector_.size(), capacity_);
410  }
411 
414  {
415  size_type cap = capacity();
416 
417  if (n > cap)
418  {
419  vector_.reserve(n);
420  capacity_ = n;
421  }
422  }
423 
426  {
427  return vector_.max_size();
428  }
429 
432  {
433  return Iterator((std::vector<const ValueType *> *) & vector_, (unsigned int)0);
434  }
435 
438  {
439  return Iterator((std::vector<const ValueType *> *) & vector_, (unsigned int)(vector_.size()));
440  }
441 
444  {
445  return ConstIterator((const std::vector<const ValueType *> *) & vector_, (unsigned int)0);
446  }
447 
450  {
451  return ConstIterator((const std::vector<const ValueType *> *) & vector_, (unsigned int)(vector_.size()));
452  }
453 
456  {
457  return ReverseIterator(end());
458  }
459 
462  {
463  return ReverseIterator(begin());
464  }
465 
468  {
469  return ConstReverseIterator(end());
470  }
471 
474  {
475  return ConstReverseIterator(begin());
476  }
477 
479  void resize(size_type new_size)
480  {
481  vector_.resize(new_size);
482  capacity_ = vector_.capacity();
483  }
484 
486  void resize(size_type new_size, const ValueType & t)
487  {
488  vector_.resize(new_size, &t);
489  capacity_ = vector_.capacity();
490  }
491 
494  {
495  return *(begin());
496  }
497 
500  {
501  return *(end() - 1);
502  }
503 
505  void clear()
506  {
507  vector_.clear();
508  }
509 
511  bool empty() const
512  {
513  return vector_.empty();
514  }
515 
518  {
519  return *(vector_[n]);
520  }
521 
523  bool operator==(const ConstRefVector & array) const
524  {
526  {
527  return false;
528  }
529  if (size() != array.size())
530  {
531  return false;
532  }
533  for (Size i = 0; i < size(); i++)
534  {
535  if (typeid(*(vector_[i])) != typeid(*(array.vector_[i])))
536  {
537  return false;
538  }
539  if (vector_[i]->operator!=(* array.vector_[i]))
540  {
541  return false;
542  }
543  }
544  return true;
545  }
546 
548  bool operator!=(const ConstRefVector & array) const
549  {
550  return !(operator==(array));
551  }
552 
554  bool operator<(const ConstRefVector & array) const
555  {
556  return size() < array.size();
557  }
558 
560  bool operator>(const ConstRefVector & array) const
561  {
562  return size() > array.size();
563  }
564 
566  bool operator<=(const ConstRefVector & array) const
567  {
568  return operator<(array) || operator==(array);
569  }
570 
572  bool operator>=(const ConstRefVector & array) const
573  {
574  return operator>(array) || operator==(array);
575  }
576 
578  void swap(ConstRefVector & array)
579  {
580  vector_.swap(array.vector_);
581  }
582 
584  friend void swap(ConstRefVector & a1, ConstRefVector & a2)
585  {
586  a1.vector_.swap(a2.vector_);
587  }
588 
590  Iterator insert(Iterator pos, const ValueType & element)
591  {
592  const ValueType * pointer = &element;
593  vector_.insert(vector_.begin() + pos.position_, pointer);
594  return pos;
595  }
596 
598  void insert(Iterator pos, size_type n, const ValueType & element)
599  {
600  const ValueType * pointer;
601  std::vector<const ValueType *> tmp;
602  for (size_type i = 0; i < n; i++)
603  {
604  pointer = &element;
605  tmp.push_back(pointer);
606  }
607  vector_.insert(vector_.begin() + pos.position_, tmp.begin(), tmp.end());
608  }
609 
611  template <class InputIterator>
612  void insert(Iterator pos, InputIterator f, InputIterator l)
613  {
614  const ValueType * pointer;
615  std::vector<const ValueType *> tmp;
616  for (InputIterator it = f; it != l; ++it)
617  {
618  pointer = &(*it);
619  tmp.push_back(pointer);
620  }
621  vector_.insert(vector_.begin() + pos.position_, tmp.begin(), tmp.end());
622  }
623 
626  {
627  vector_.erase(vector_.begin() + pos.position_);
628  return pos;
629  }
630 
633  {
634  vector_.erase(vector_.begin() + first.position_, vector_.begin() + last.position_);
635  return first;
636  }
637 
639 
640  ConstRefVector() :
642  capacity_(0),
644  {
645  }
646 
649  capacity_(0),
651  {
652  vector_ = std::vector<const ValueType *>(n);
653  }
654 
656  ConstRefVector(size_type n, const ValueType & element) :
657  capacity_(0),
659  {
660  vector_ = std::vector<const ValueType *>(n, &element);
661  }
662 
665  capacity_(0),
667  {
668  const ValueType * element;
669  for (ConstIterator it = p.begin(); it != p.end(); ++it)
670  {
671  element = &(*it);
672  vector_.push_back(element);
673  }
674  }
675 
677  template <class InputIterator>
678  ConstRefVector(InputIterator f, InputIterator l) :
679  capacity_(0),
681  {
682  const ValueType * pointer;
683  for (InputIterator it = f; it != l; ++it)
684  {
685  pointer = &(*it);
686  vector_.push_back(pointer);
687  }
688  }
689 
692  capacity_(0),
694  {
695  const ValueType * element;
696  for (typename ContainerType::iterator it = p.begin(); it != p.end(); ++it)
697  {
698  element = &(*it);
699  vector_.push_back(element);
700  }
701  }
702 
705  {
706  }
707 
709 
712  {
713  if (this == &rhs) return *this;
714 
716  clear();
717  reserve(rhs.size());
718  const ValueType * element;
719  for (ConstIterator it = rhs.begin(); it != rhs.end(); ++it)
720  {
721  element = &(*it);
722  vector_.push_back(element);
723  }
724 
725  return *this;
726  }
727 
729  template <class InputIterator>
730  void assign(InputIterator f, InputIterator l)
731  {
732  clear();
733  insert(end(), f, l);
734  }
735 
737  void assign(size_type n, const ValueType & x)
738  {
739  clear();
740  insert(end(), n, x);
741  }
742 
751 
753  void sortByIntensity(bool reverse = false)
754  {
755  if (reverse)
756  {
757  std::sort(vector_.begin(), vector_.end(), reverseComparator(pointerComparator(typename ValueType::IntensityLess())));
758  }
759  else
760  {
761  std::sort(vector_.begin(), vector_.end(), pointerComparator(typename ValueType::IntensityLess()));
762  }
763  }
764 
767  {
768  std::sort(vector_.begin(), vector_.end(), pointerComparator(typename ValueType::PositionLess()));
769  }
770 
772 
786  template <typename ComparatorType>
787  void sortByComparator(ComparatorType const & comparator = ComparatorType())
788  {
789  std::sort(vector_.begin(), vector_.end(), pointerComparator(comparator));
790  }
791 
793 
794  //----------------------------------------------------------------------
795 
796 protected:
797 
799  std::vector<const ValueType *> vector_;
804  };
805 
806 } // namespace OpenMS
807 
808 #endif // OPENMS_DATASTRUCTURES_CONSTREFVECTOR_H
ConstRefVectorIterator(const ConstRefVectorIterator< ValueType > &it)
Definition: ConstRefVector.h:267
ConstRefVectorConstIterator< ValueType >::value_type & reference
Definition: ConstRefVector.h:251
ContainerT ContainerType
Type definitions.
Definition: ConstRefVector.h:363
Iterator iterator
Definition: ConstRefVector.h:380
~ConstRefVector()
See std::vector documentation.
Definition: ConstRefVector.h:704
ConstRefVectorConstIterator(const typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:94
ContainerType::pointer pointer
Definition: ConstRefVector.h:379
ConstRefVectorIterator()
Definition: ConstRefVector.h:258
ValueT ValueType
Definition: ConstRefVector.h:250
ConstReverseIterator rend() const
See std::vector documentation.
Definition: ConstRefVector.h:473
ConstRefVector & operator=(const ConstRefVector &rhs)
See std::vector documentation.
Definition: ConstRefVector.h:711
std::vector< const ValueType * > vector_
the internal vector of ValueType pointers
Definition: ConstRefVector.h:799
Iterator insert(Iterator pos, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:590
ConstRefVectorConstIterator operator-(difference_type n) const
Definition: ConstRefVector.h:181
void resize(size_type new_size, const ValueType &t)
See std::vector documentation.
Definition: ConstRefVector.h:486
bool operator<=(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:566
pointer operator->()
Definition: ConstRefVector.h:224
bool operator>(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:560
ConstRefVectorConstIterator< ValueType >::value_type * pointer
Definition: ConstRefVector.h:252
ConstRefVectorConstIterator operator++(int)
Definition: ConstRefVector.h:161
Iterator erase(Iterator pos)
See std::vector documentation.
Definition: ConstRefVector.h:625
~ConstRefVectorConstIterator()
Definition: ConstRefVector.h:112
friend difference_type operator-(const ConstRefVectorConstIterator &i1, const ConstRefVectorConstIterator &i2)
Definition: ConstRefVector.h:207
ConstRefVector(size_type n, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:656
bool operator<=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:135
ContainerType::size_type size_type
Definition: ConstRefVector.h:375
Iterator begin()
See std::vector documentation.
Definition: ConstRefVector.h:431
void sortByIntensity(bool reverse=false)
Sorting.
Definition: ConstRefVector.h:753
ConstRefVectorConstIterator & operator-=(difference_type n)
Definition: ConstRefVector.h:201
bool operator>(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:130
ConstRefVector()
See std::vector documentation.
Definition: ConstRefVector.h:641
ReverseComparator< Cmp > reverseComparator(Cmp const &cmp)
Make-function to create a ReverseComparator from another comparator without the need to specify the t...
Definition: ComparatorUtils.h:261
ConstRefVector(const ConstRefVector &p)
See std::vector documentation.
Definition: ConstRefVector.h:664
ConstRefVectorConstIterator & operator+=(difference_type n)
Definition: ConstRefVector.h:195
ConstRefVectorIterator< const ValueType > Iterator
Definition: ConstRefVector.h:366
ConstRefVectorConstIterator(typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:100
ConstRefVectorIterator & operator++()
Definition: ConstRefVector.h:291
bool operator<(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:554
ValueT ValueType
Definition: ConstRefVector.h:83
friend void swap(ConstRefVector &a1, ConstRefVector &a2)
See std::vector documentation.
Definition: ConstRefVector.h:584
size_type size() const
See std::vector documentation.
Definition: ConstRefVector.h:401
bool operator>=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:140
ConstIterator for the ConstRefVector.
Definition: ConstRefVector.h:78
ConstRefVectorIterator & operator+=(typename ConstRefVectorIterator::difference_type n)
Definition: ConstRefVector.h:338
ConstRefVectorIterator & operator-=(typename ConstRefVectorIterator::difference_type n)
Definition: ConstRefVector.h:344
ConstRefVectorConstIterator & operator=(const ConstRefVectorConstIterator &rhs)
Definition: ConstRefVector.h:115
ConstRefVectorIterator & operator--()
Definition: ConstRefVector.h:304
void assign(InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:730
ConstRefVectorIterator operator+(typename ConstRefVectorIterator::difference_type n) const
Definition: ConstRefVector.h:324
pointer operator->()
Definition: ConstRefVector.h:281
bool operator==(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:145
ReverseIterator rbegin()
See std::vector documentation.
Definition: ConstRefVector.h:455
const_reference back() const
See std::vector documentation.
Definition: ConstRefVector.h:499
void assign(size_type n, const ValueType &x)
See std::vector documentation.
Definition: ConstRefVector.h:737
const value_type & reference
Definition: ConstRefVector.h:86
bool empty() const
See std::vector documentation.
Definition: ConstRefVector.h:511
ConstRefVectorConstIterator(const ConstRefVectorConstIterator &it)
Definition: ConstRefVector.h:106
friend void swap(ConstRefVectorIterator &i1, ConstRefVectorIterator &i2)
Definition: ConstRefVector.h:350
ValueType value_type
STL-compliance type definitions.
Definition: ConstRefVector.h:374
ValueType value_type
Definition: ConstRefVector.h:84
ContainerType::reference reference
Definition: ConstRefVector.h:377
ConstRefVectorConstIterator operator--(int)
Definition: ConstRefVector.h:174
void swap(ConstRefVector &array)
See std::vector documentation.
Definition: ConstRefVector.h:578
size_type capacity() const
See std::vector documentation.
Definition: ConstRefVector.h:407
bool operator==(const ConstRefVector &array) const
See std::vector documentation.
Definition: ConstRefVector.h:523
void clear()
See std::vector documentation.
Definition: ConstRefVector.h:505
ContainerType::difference_type difference_type
Definition: ConstRefVector.h:376
reference operator*()
Definition: ConstRefVector.h:219
bool operator>=(const ConstRefVector &array) const
Comparison of container sizes.
Definition: ConstRefVector.h:572
ConstRefVectorIterator operator-(typename ConstRefVectorIterator::difference_type n) const
Definition: ConstRefVector.h:317
void pop_back()
See std::vector documentation.
Definition: ConstRefVector.h:395
const_reference front() const
See std::vector documentation.
Definition: ConstRefVector.h:493
ConstRefVectorConstIterator()
Definition: ConstRefVector.h:90
std::reverse_iterator< ConstIterator > ConstReverseIterator
Definition: ConstRefVector.h:369
ConstRefVector(InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:678
std::vector< ValueType * >::difference_type difference_type
Definition: ConstRefVector.h:85
ConstRefVector(size_type n)
See std::vector documentation.
Definition: ConstRefVector.h:648
Mutable iterator for the ConstRefVector.
Definition: ConstRefVector.h:243
void push_back(const ValueType &x)
See std::vector documentation.
Definition: ConstRefVector.h:388
void insert(Iterator pos, size_type n, const ValueType &element)
See std::vector documentation.
Definition: ConstRefVector.h:598
bool operator!=(const ConstRefVector &array) const
See std::vector documentation.
Definition: ConstRefVector.h:548
void resize(size_type new_size)
See std::vector documentation.
Definition: ConstRefVector.h:479
friend ConstRefVectorConstIterator operator+(difference_type n, const ConstRefVectorConstIterator &i)
Definition: ConstRefVector.h:212
ContainerType::value_type ValueType
Definition: ConstRefVector.h:365
size_type capacity_
the current capacity
Definition: ConstRefVector.h:801
ConstRefVectorIterator(typename std::vector< ValueType * > *vec, unsigned int position)
Definition: ConstRefVector.h:262
ConstRefVectorConstIterator & operator--()
Definition: ConstRefVector.h:168
ConstIterator begin() const
See std::vector documentation.
Definition: ConstRefVector.h:443
PointerComparator< Cmp > pointerComparator(Cmp const &cmp)
Make-function to create a PointerComparator from another comparator without the need to specify the t...
Definition: ComparatorUtils.h:210
const ContainerType * base_container_ptr_
Pointer to the base container.
Definition: ConstRefVector.h:803
bool operator<(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:125
Iterator erase(Iterator first, Iterator last)
See std::vector documentation.
Definition: ConstRefVector.h:632
ContainerType::const_reference const_reference
Definition: ConstRefVector.h:378
ConstRefVectorIterator operator++(int)
Definition: ConstRefVector.h:297
std::reverse_iterator< Iterator > ReverseIterator
Definition: ConstRefVector.h:368
ConstRefVectorConstIterator< const ValueType > ConstIterator
Definition: ConstRefVector.h:367
ConstIterator end() const
See std::vector documentation.
Definition: ConstRefVector.h:449
const value_type * pointer
Definition: ConstRefVector.h:87
void sortByComparator(ComparatorType const &comparator=ComparatorType())
Definition: ConstRefVector.h:787
ReverseIterator reverse_iterator
Definition: ConstRefVector.h:382
ConstRefVectorConstIterator operator+(difference_type n) const
Definition: ConstRefVector.h:188
ConstReverseIterator rbegin() const
See std::vector documentation.
Definition: ConstRefVector.h:467
ConstRefVectorIterator operator--(int)
Definition: ConstRefVector.h:310
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:144
std::vector< ValueType * > * vector_
Definition: ConstRefVector.h:236
pointer operator->() const
Definition: ConstRefVector.h:286
ConstRefVector(ContainerType &p)
See std::vector documentation.
Definition: ConstRefVector.h:691
std::random_access_iterator_tag iterator_category
Definition: ConstRefVector.h:88
ReverseIterator rend()
See std::vector documentation.
Definition: ConstRefVector.h:461
pointer operator->() const
Definition: ConstRefVector.h:229
ConstIterator const_iterator
Definition: ConstRefVector.h:381
This vector holds pointer to the elements of another container.
Definition: ConstRefVector.h:72
~ConstRefVectorIterator()
Definition: ConstRefVector.h:272
reference operator*()
Definition: ConstRefVector.h:276
void sortByPosition()
Lexicographically sorts the elements by their position.
Definition: ConstRefVector.h:766
friend ConstRefVectorIterator operator+(typename ConstRefVectorIterator::difference_type n, const ConstRefVectorIterator &i)
Definition: ConstRefVector.h:331
unsigned int position_
Definition: ConstRefVector.h:237
const_reference operator[](size_type n) const
See std::vector documentation.
Definition: ConstRefVector.h:517
size_type max_size() const
See std::vector documentation.
Definition: ConstRefVector.h:425
Iterator end()
See std::vector documentation.
Definition: ConstRefVector.h:437
ConstRefVectorConstIterator & operator++()
Definition: ConstRefVector.h:155
ConstReverseIterator const_reverse_iterator
Definition: ConstRefVector.h:383
void insert(Iterator pos, InputIterator f, InputIterator l)
See std::vector documentation.
Definition: ConstRefVector.h:612
bool operator!=(const ConstRefVectorConstIterator &it) const
Definition: ConstRefVector.h:150
void reserve(size_type n)
See std::vector documentation.
Definition: ConstRefVector.h:413

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:12 using doxygen 1.8.5