OpenWalnut  1.5.0dev
WMixinVector.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 // PLEASE NOTE THAT THIS IS A COPY FROM THE OSG PROJECT: <osg/MixinVector>
26 // http://www.openscenegraph.org/projects/osg/attachment/wiki/Legal/LICENSE.txt
27 
28 #ifndef WMIXINVECTOR_H
29 #define WMIXINVECTOR_H
30 
31 #include <algorithm>
32 #include <iostream>
33 #include <vector>
34 
35 #include "WStringUtils.h"
36 
37 /**
38  * This is taken from OpenSceneGraph <osg/MixinVector> but copy and pasted in
39  * order to reduce dependency to OSG. It follows the orignal documentation:
40  *
41  * WMixinVector is a base class that allows inheritance to be used to easily
42  * emulate derivation from std::vector but without introducing undefined
43  * behaviour through violation of virtual destructor rules.
44  *
45  * @author Neil Groves
46  **/
47 template< class ValueT > class WMixinVector
48 {
49  /**
50  * Handy shortcut for the vector type
51  */
52  typedef typename std::vector< ValueT > vector_type;
53 
54 public:
55  /**
56  * Compares to std::vector type
57  */
58  typedef typename vector_type::allocator_type allocator_type;
59 
60  /**
61  * Compares to std::vector type
62  */
63  typedef typename vector_type::value_type value_type;
64  /**
65  * Compares to std::vector type
66  */
67  typedef typename vector_type::const_pointer const_pointer;
68 
69  /**
70  * Compares to std::vector type
71  */
72  typedef typename vector_type::pointer pointer;
73 
74  /**
75  * Compares to std::vector type
76  */
77  typedef typename vector_type::const_reference const_reference;
78 
79  /**
80  * Compares to std::vector type
81  */
82  typedef typename vector_type::reference reference;
83 
84  /**
85  * Compares to std::vector type
86  */
87  typedef typename vector_type::const_iterator const_iterator;
88 
89  /**
90  * Compares to std::vector type
91  */
92  typedef typename vector_type::iterator iterator;
93 
94  /**
95  * Compares to std::vector type
96  */
97  typedef typename vector_type::const_reverse_iterator const_reverse_iterator;
98 
99  /**
100  * Compares to std::vector type
101  */
102  typedef typename vector_type::reverse_iterator reverse_iterator;
103 
104  /**
105  * Compares to std::vector type
106  */
107 
108  /**
109  * Compares to std::vector type
110  */
111  typedef typename vector_type::size_type size_type;
112 
113  /**
114  * Compares to std::vector type
115  */
116  typedef typename vector_type::difference_type difference_type;
117 
118  /**
119  * Empty standard constructor
120  */
121  explicit WMixinVector() : _impl()
122  {
123  }
124 
125  /**
126  * Constructs a vector of initial_size size where every emlement has its
127  * default value or the given value.
128  *
129  *
130  * \param initial_size The initial size
131  * \param fill_value The default value for every element
132  */
133  explicit WMixinVector( size_type initial_size, const value_type& fill_value = value_type() )
134  : _impl( initial_size, fill_value )
135  {
136  }
137 
138 
139  /**
140  * Constructs a new vector out of an iterator of another vector.
141  *
142  * \param first Begin of the iterator
143  * \param last End of the iterator
144  */
145  template< class InputIterator > WMixinVector( InputIterator first, InputIterator last )
146  : _impl( first, last )
147  {
148  }
149 
150  /**
151  * Copy constructor for the appropriate vector type
152  *
153  * \param other Other std::vector of type vector_type
154  */
155  explicit WMixinVector( const vector_type& other )
156  : _impl( other )
157  {
158  }
159 
160  /**
161  * Copy constructor for the WMixinVector itself
162  *
163  * \param other Other WMixinVector
164  */
165  WMixinVector( const WMixinVector& other )
166  : _impl( other._impl )
167  {
168  }
169 
170  /**
171  * Assignment operator for the appropriate vector type
172  *
173  * \param other Other std::vector
174  *
175  * \return Reference to the assigned mixin
176  */
178  {
179  _impl = other;
180  return *this;
181  }
182 
183  /**
184  * Assigment operator for the WMixinVector itself
185  *
186  * \param other Other WMixinVector
187  *
188  * \return Reference to the assigned mixin
189  */
191  {
192  _impl = other._impl;
193  return *this;
194  }
195 
196  /**
197  * Virtual Destructor
198  */
199  virtual ~WMixinVector()
200  {
201  }
202 
203  /**
204  * Wrapper around std::vector member function.
205  */
206  void clear()
207  {
208  _impl.clear();
209  }
210 
211  /**
212  * Wrapper around std::vector member function.
213  *
214  * \param new_size
215  * \param fill_value
216  */
217  void resize( size_type new_size, const value_type& fill_value = value_type() )
218  {
219  _impl.resize( new_size, fill_value );
220  }
221 
222  /**
223  * Wrapper around std::vector member function.
224  *
225  * \param new_capacity How many elements will be in this vector
226  */
227  void reserve( size_type new_capacity )
228  {
229  _impl.reserve( new_capacity );
230  }
231 
232  /**
233  * Allow also swap with vectors of an appropriate type
234  *
235  * \param other To swap with
236  */
237  void swap( vector_type& other )
238  {
239  _impl.swap( other );
240  }
241 
242  /**
243  * Wrapper around std::vector member function.
244  *
245  * \param other
246  */
247  void swap( WMixinVector& other )
248  {
249  _impl.swap( other._impl );
250  }
251 
252  /**
253  * Wrapper around std::vector member function.
254  *
255  * \return True if empty otherwise false.
256  */
257  bool empty() const
258  {
259  return _impl.empty();
260  }
261 
262  /**
263  * Wrapper around std::vector member function.
264  *
265  * \return How many elements this vector has
266  */
267  size_type size() const
268  {
269  return _impl.size();
270  }
271 
272  /**
273  * Wrapper around std::vector member function.
274  *
275  * \return Its capacity
276  */
278  {
279  return _impl.capacity();
280  }
281 
282  /**
283  * Wrapper around std::vector member function.
284  *
285  * \return Its maximal size
286  */
288  {
289  return _impl.max_size();
290  }
291 
292  /**
293  * Returns its allocator
294  *
295  * \return Its allocator
296  */
298  {
299  return _impl.get_allocator();
300  }
301 
302  /**
303  * Wrapper around std::vector member function.
304  *
305  * \return Const iterator starting a the first element
306  */
308  {
309  return _impl.begin();
310  }
311 
312  /**
313  * Wrapper around std::vector member function.
314  *
315  * \return Iterator starting a the first element
316  */
318  {
319  return _impl.begin();
320  }
321 
322  /**
323  * Wrapper around std::vector member function.
324  *
325  * \return Const iterator starting a the last element
326  */
328  {
329  return _impl.end();
330  }
331 
332  /**
333  * Wrapper around std::vector member function.
334  *
335  * \return Iterator starting a the last element
336  */
338  {
339  return _impl.end();
340  }
341 
342  /**
343  * Wrapper around std::vector member function.
344  *
345  * \return Const reverse iterator starting a the last element
346  */
348  {
349  return _impl.rbegin();
350  }
351 
352  /**
353  * Wrapper around std::vector member function.
354  *
355  * \return Reverse iterator starting a the last element
356  */
358  {
359  return _impl.rbegin();
360  }
361 
362  /**
363  * Wrapper around std::vector member function.
364  *
365  * \return Const reverse iterator starting a the first element
366  */
368  {
369  return _impl.rend();
370  }
371 
372  /**
373  * Wrapper around std::vector member function.
374  *
375  * \return Reverse iterator starting a the first element
376  */
378  {
379  return _impl.rend();
380  }
381 
382  /**
383  * Wrapper around std::vector member function.
384  *
385  * \param index Index of the element that is returned
386  *
387  * \return Const referenece to the index'th element
388  */
390  {
391  return _impl[index];
392  }
393 
394  /**
395  * Wrapper around std::vector member function.
396  *
397  * \param index Index of the element that is returned
398  *
399  * \return Referenece to the index'th element
400  */
402  {
403  return _impl[index];
404  }
405 
406  /**
407  * Wrapper around std::vector member function.
408  *
409  * \param index Index of the element that is returned
410  *
411  * \return Const referenece to the index'th element
412  */
413  const_reference at( size_type index ) const
414  {
415  return _impl.at( index );
416  }
417 
418  /**
419  * Wrapper around std::vector member function.
420  *
421  * \param index Index of the element that is returned
422  *
423  * \return Referenece to the index'th element
424  */
426  {
427  return _impl.at( index );
428  }
429 
430  /**
431  * Wrapper around std::vector member function.
432  *
433  * \param count
434  * \param value
435  */
436  void assign( size_type count, const value_type& value )
437  {
438  _impl.assign( count, value );
439  }
440 
441  /**
442  * Wrapper around std::vector member function.
443  *
444  * \param first
445  * \param last
446  */
447  template< class Iter > void assign( Iter first, Iter last )
448  {
449  _impl.assign( first, last );
450  }
451 
452  /**
453  * Wrapper around std::vector member function.
454  *
455  * \param value Value to append
456  */
457  void push_back( const value_type& value )
458  {
459  _impl.push_back( value );
460  }
461 
462  /**
463  * Wrapper around std::vector member function.
464  */
465  void pop_back()
466  {
467  _impl.pop_back();
468  }
469 
470  /**
471  * Wrapper around std::vector member function.
472  *
473  * \param where Position where to erase
474  *
475  * \return Iterator from the erase
476  */
478  {
479  return _impl.erase( where );
480  }
481 
482  /**
483  * Wrapper around std::vector member function.
484  *
485  * \param first Start from where to erase
486  * \param last End unti to erase
487  *
488  * \return Iterator from erase
489  */
491  {
492  return _impl.erase( first, last );
493  }
494 
495  /**
496  * Wrapper around std::vector member function.
497  *
498  * \param where Position where to insert
499  * \param value Value of the element to insert
500  *
501  * \return Iterator from insert
502  */
503  iterator insert( iterator where, const value_type& value )
504  {
505  return _impl.insert( where, value );
506  }
507 
508  /**
509  * Wrapper around std::vector member function.
510  *
511  * \param where Position where to insert
512  * \param first Position where to start insert ( First element that should be copied )
513  * \param last Position where to end insert ( Last element that should be copied )
514  */
515  template< class InputIterator > void insert( iterator where, InputIterator first, InputIterator last )
516  {
517  _impl.insert( where, first, last );
518  }
519 
520  /**
521  * Wrapper around std::vector member function.
522  *
523  * \param where Position where to insert
524  * \param count How many elements to insert
525  * \param value Which value is inserted
526  */
527  void insert( iterator where, size_type count, const value_type& value )
528  {
529  _impl.insert( where, count, value );
530  }
531 
532  /**
533  * Wrapper around std::vector member function.
534  *
535  * \return Const reference to last element
536  */
538  {
539  return _impl.back();
540  }
541 
542  /**
543  * Wrapper around std::vector member function.
544  *
545  * \return Reference to last element
546  */
548  {
549  return _impl.back();
550  }
551 
552  /**
553  * Wrapper around std::vector member function.
554  *
555  * \return Const reference to first element
556  */
558  {
559  return _impl.front();
560  }
561 
562  /**
563  * Wrapper around std::vector member function.
564  *
565  * \return Reference to first element
566  */
568  {
569  return _impl.front();
570  }
571 
572  /**
573  * Return this Mixin as its underlying real vector type.
574  * \warning Use with caution!
575  *
576  * \return Reference to its private vector.
577  */
579  {
580  return _impl;
581  }
582 
583  /**
584  * Return this Mixin as its underlying real vector type.
585  *
586  * \return Const reference to its private vector.
587  */
588  const vector_type& asVector() const
589  {
590  return _impl;
591  }
592 
593  /**
594  * Wrapper around std::vector operator
595  *
596  * \param left Left hand side
597  * \param right Right hand side
598  *
599  * \return True if and only if std::vector operator is true
600  */
601  friend inline bool operator==( const WMixinVector< ValueT >& left, const WMixinVector< ValueT >& right )
602  {
603  return left._impl == right._impl;
604  }
605 
606  /**
607  * Wrapper around std::vector operator
608  *
609  * \param left Left hand side
610  * \param right Right hand side
611  *
612  * \return True if and only if std::vector operator is true
613  */
614  friend inline bool operator==( const WMixinVector< ValueT >& left, const std::vector< ValueT >& right )
615  {
616  return left._impl == right;
617  }
618 
619  /**
620  * Wrapper around std::vector operator
621  *
622  * \param left Left hand side
623  * \param right Right hand side
624  *
625  * \return True if and only if std::vector operator is true
626  */
627  friend inline bool operator==( const std::vector< ValueT >& left, const WMixinVector< ValueT >& right )
628  {
629  return left == right._impl;
630  }
631 
632 
633  /**
634  * Wrapper around std::vector operator
635  *
636  * \param left Left hand side
637  * \param right Right hand side
638  *
639  * \return True if and only if std::vector operator is true
640  */
641  friend inline bool operator!=( const WMixinVector< ValueT >& left, const WMixinVector< ValueT >& right )
642  {
643  return left._impl != right._impl;
644  }
645 
646  /**
647  * Wrapper around std::vector operator
648  *
649  * \param left Left hand side
650  * \param right Right hand side
651  *
652  * \return True if and only if std::vector operator is true
653  */
654  friend inline bool operator!=( const WMixinVector< ValueT >& left, const std::vector< ValueT >& right )
655  {
656  return left._impl != right;
657  }
658 
659  /**
660  * Wrapper around std::vector operator
661  *
662  * \param left Left hand side
663  * \param right Right hand side
664  *
665  * \return True if and only if std::vector operator is true
666  */
667  friend inline bool operator!=( const std::vector< ValueT >& left, const WMixinVector< ValueT >& right )
668  {
669  return left != right._impl;
670  }
671 
672 
673  /**
674  * Wrapper around std::vector operator
675  *
676  * \param left Left hand side
677  * \param right Right hand side
678  *
679  * \return True if and only if std::vector operator is true
680  */
681  friend inline bool operator<( const WMixinVector< ValueT >& left, const WMixinVector< ValueT >& right )
682  {
683  return left._impl < right._impl;
684  }
685 
686  /**
687  * Wrapper around std::vector operator
688  *
689  * \param left Left hand side
690  * \param right Right hand side
691  *
692  * \return True if and only if std::vector operator is true
693  */
694  friend inline bool operator<( const WMixinVector< ValueT >& left, const std::vector< ValueT >& right )
695  {
696  return left._impl < right;
697  }
698 
699  /**
700  * Wrapper around std::vector operator
701  *
702  * \param left Left hand side
703  * \param right Right hand side
704  *
705  * \return True if and only if std::vector operator is true
706  */
707  friend inline bool operator<( const std::vector< ValueT >& left, const WMixinVector< ValueT >& right )
708  {
709  return left < right._impl;
710  }
711 
712 
713  /**
714  * Wrapper around std::vector operator
715  *
716  * \param left Left hand side
717  * \param right Right hand side
718  *
719  * \return True if and only if std::vector operator is true
720  */
721  friend inline bool operator >( const WMixinVector< ValueT >& left, const WMixinVector< ValueT >& right )
722  {
723  return left._impl > right._impl;
724  }
725 
726  /**
727  * Wrapper around std::vector operator
728  *
729  * \param left Left hand side
730  * \param right Right hand side
731  *
732  * \return True if and only if std::vector operator is true
733  */
734  friend inline bool operator >( const WMixinVector< ValueT >& left, const std::vector< ValueT >& right )
735  {
736  return left._impl > right;
737  }
738 
739  /**
740  * Wrapper around std::vector operator
741  *
742  * \param left Left hand side
743  * \param right Right hand side
744  *
745  * \return True if and only if std::vector operator is true
746  */
747  friend inline bool operator >( const std::vector< ValueT >& left, const WMixinVector< ValueT >& right )
748  {
749  return left > right._impl;
750  }
751 
752 
753  /**
754  * Wrapper around std::vector operator
755  *
756  * \param left Left hand side
757  * \param right Right hand side
758  *
759  * \return True if and only if std::vector operator is true
760  */
761  friend inline bool operator<=( const WMixinVector< ValueT >& left, const WMixinVector< ValueT >& right )
762  {
763  return left._impl <= right._impl;
764  }
765 
766  /**
767  * Wrapper around std::vector operator
768  *
769  * \param left Left hand side
770  * \param right Right hand side
771  *
772  * \return True if and only if std::vector operator is true
773  */
774  friend inline bool operator<=( const WMixinVector< ValueT >& left, const std::vector< ValueT >& right )
775  {
776  return left._impl <= right;
777  }
778 
779  /**
780  * Wrapper around std::vector operator
781  *
782  * \param left Left hand side
783  * \param right Right hand side
784  *
785  * \return True if and only if std::vector operator is true
786  */
787  friend inline bool operator<=( const std::vector< ValueT >& left, const WMixinVector< ValueT >& right )
788  {
789  return left <= right._impl;
790  }
791 
792 
793  /**
794  * Wrapper around std::vector operator
795  *
796  * \param left Left hand side
797  * \param right Right hand side
798  *
799  * \return True if and only if std::vector operator is true
800  */
801  friend inline bool operator>=( const WMixinVector< ValueT >& left, const WMixinVector< ValueT >& right )
802  {
803  return left._impl >= right._impl;
804  }
805 
806  /**
807  * Wrapper around std::vector operator
808  *
809  * \param left Left hand side
810  * \param right Right hand side
811  *
812  * \return True if and only if std::vector operator is true
813  */
814  friend inline bool operator>=( const WMixinVector< ValueT >& left, const std::vector< ValueT >& right )
815  {
816  return left._impl >= right;
817  }
818 
819  /**
820  * Wrapper around std::vector operator
821  *
822  * \param left Left hand side
823  * \param right Right hand side
824  *
825  * \return True if and only if std::vector operator is true
826  */
827  friend inline bool operator>=( const std::vector< ValueT >& left, const WMixinVector< ValueT >& right )
828  {
829  return left >= right._impl;
830  }
831 
832 private:
833  /**
834  * Encapsulated internal vector from which derivation is simulated.
835  */
837 };
838 
839 /**
840  * Standard non member wrapper function to swap
841  *
842  * \param left Left hand side
843  * \param right Right hand side
844  */
845 template< class ValueT > inline void swap( WMixinVector< ValueT >& left, WMixinVector< ValueT >& right )
846 {
847  std::swap( left.asVector(), right.asVector() );
848 }
849 
850 /**
851  * Standard non member wrapper function to swap
852  *
853  * \param left Left hand side
854  * \param right Right hand side
855  */
856 template< class ValueT > inline void swap( WMixinVector< ValueT >& left, std::vector< ValueT >& right )
857 {
858  std::swap( left.asVector(), right );
859 }
860 
861 /**
862  * Standard non member wrapper function to swap
863  *
864  * \param left Left hand side
865  * \param right Right hand side
866  */
867 template< class ValueT > inline void swap( std::vector< ValueT >& left, WMixinVector< ValueT >& right )
868 {
869  std::swap( left, right.asVector() );
870 }
871 
872 /**
873  * Writes every mixin vector to an output stream such as cout, if its
874  * elements have an output operator defined.
875  *
876  * \param os The output stream where the elements are written to
877  * \param v MixinVector containing the elements
878  * \return The output stream again.
879  */
880 template< class ValueT > inline std::ostream& operator<<( std::ostream& os, const WMixinVector< ValueT >& v )
881 {
882  using string_utils::operator<<;
883  os << v.asVector();
884  return os;
885 }
886 
887 #endif // WMIXINVECTOR_H
This is taken from OpenSceneGraph <osg/MixinVector> but copy and pasted in order to reduce dependency...
Definition: WMixinVector.h:48
void reserve(size_type new_capacity)
Wrapper around std::vector member function.
Definition: WMixinVector.h:227
WMixinVector(size_type initial_size, const value_type &fill_value=value_type())
Constructs a vector of initial_size size where every emlement has its default value or the given valu...
Definition: WMixinVector.h:133
const_reverse_iterator rbegin() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:347
WMixinVector & operator=(const vector_type &other)
Assignment operator for the appropriate vector type.
Definition: WMixinVector.h:177
reference front()
Wrapper around std::vector member function.
Definition: WMixinVector.h:567
vector_type::iterator iterator
Compares to std::vector type.
Definition: WMixinVector.h:92
void pop_back()
Wrapper around std::vector member function.
Definition: WMixinVector.h:465
friend bool operator!=(const WMixinVector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:641
size_type size() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:267
reference operator[](size_type index)
Wrapper around std::vector member function.
Definition: WMixinVector.h:401
friend bool operator==(const WMixinVector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:601
WMixinVector()
Empty standard constructor.
Definition: WMixinVector.h:121
iterator erase(iterator first, iterator last)
Wrapper around std::vector member function.
Definition: WMixinVector.h:490
friend bool operator<=(const WMixinVector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:761
iterator end()
Wrapper around std::vector member function.
Definition: WMixinVector.h:337
allocator_type get_allocator() const
Returns its allocator.
Definition: WMixinVector.h:297
vector_type::pointer pointer
Compares to std::vector type.
Definition: WMixinVector.h:72
friend bool operator<(const std::vector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:707
void assign(Iter first, Iter last)
Wrapper around std::vector member function.
Definition: WMixinVector.h:447
void push_back(const value_type &value)
Wrapper around std::vector member function.
Definition: WMixinVector.h:457
vector_type::const_pointer const_pointer
Compares to std::vector type.
Definition: WMixinVector.h:67
const_reference back() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:537
virtual ~WMixinVector()
Virtual Destructor.
Definition: WMixinVector.h:199
WMixinVector(const vector_type &other)
Copy constructor for the appropriate vector type.
Definition: WMixinVector.h:155
vector_type::value_type value_type
Compares to std::vector type.
Definition: WMixinVector.h:63
vector_type _impl
Encapsulated internal vector from which derivation is simulated.
Definition: WMixinVector.h:836
const_reverse_iterator rend() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:367
void swap(vector_type &other)
Allow also swap with vectors of an appropriate type.
Definition: WMixinVector.h:237
iterator erase(iterator where)
Wrapper around std::vector member function.
Definition: WMixinVector.h:477
bool empty() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:257
friend bool operator!=(const std::vector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:667
std::vector< ValueT > vector_type
Handy shortcut for the vector type.
Definition: WMixinVector.h:52
friend bool operator<(const WMixinVector< ValueT > &left, const std::vector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:694
iterator begin()
Wrapper around std::vector member function.
Definition: WMixinVector.h:317
const_reference front() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:557
reverse_iterator rend()
Wrapper around std::vector member function.
Definition: WMixinVector.h:377
vector_type::difference_type difference_type
Compares to std::vector type.
Definition: WMixinVector.h:116
friend bool operator>(const WMixinVector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:721
const_reference operator[](size_type index) const
Wrapper around std::vector member function.
Definition: WMixinVector.h:389
friend bool operator<(const WMixinVector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:681
void resize(size_type new_size, const value_type &fill_value=value_type())
Wrapper around std::vector member function.
Definition: WMixinVector.h:217
vector_type::const_reverse_iterator const_reverse_iterator
Compares to std::vector type.
Definition: WMixinVector.h:97
vector_type::size_type size_type
Compares to std::vector type.
Definition: WMixinVector.h:111
vector_type::reverse_iterator reverse_iterator
Compares to std::vector type.
Definition: WMixinVector.h:102
friend bool operator>=(const WMixinVector< ValueT > &left, const std::vector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:814
vector_type & asVector()
Return this Mixin as its underlying real vector type.
Definition: WMixinVector.h:578
vector_type::allocator_type allocator_type
Compares to std::vector type.
Definition: WMixinVector.h:58
friend bool operator!=(const WMixinVector< ValueT > &left, const std::vector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:654
iterator insert(iterator where, const value_type &value)
Wrapper around std::vector member function.
Definition: WMixinVector.h:503
friend bool operator>=(const WMixinVector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:801
const_iterator end() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:327
friend bool operator>=(const std::vector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:827
friend bool operator<=(const std::vector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:787
friend bool operator==(const WMixinVector< ValueT > &left, const std::vector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:614
WMixinVector(InputIterator first, InputIterator last)
Constructs a new vector out of an iterator of another vector.
Definition: WMixinVector.h:145
size_type max_size() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:287
const_iterator begin() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:307
WMixinVector(const WMixinVector &other)
Copy constructor for the WMixinVector itself.
Definition: WMixinVector.h:165
friend bool operator<=(const WMixinVector< ValueT > &left, const std::vector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:774
friend bool operator==(const std::vector< ValueT > &left, const WMixinVector< ValueT > &right)
Wrapper around std::vector operator.
Definition: WMixinVector.h:627
void insert(iterator where, InputIterator first, InputIterator last)
Wrapper around std::vector member function.
Definition: WMixinVector.h:515
const_reference at(size_type index) const
Wrapper around std::vector member function.
Definition: WMixinVector.h:413
void assign(size_type count, const value_type &value)
Wrapper around std::vector member function.
Definition: WMixinVector.h:436
vector_type::const_iterator const_iterator
Compares to std::vector type.
Definition: WMixinVector.h:87
WMixinVector & operator=(const WMixinVector &other)
Assigment operator for the WMixinVector itself.
Definition: WMixinVector.h:190
const vector_type & asVector() const
Return this Mixin as its underlying real vector type.
Definition: WMixinVector.h:588
reverse_iterator rbegin()
Wrapper around std::vector member function.
Definition: WMixinVector.h:357
reference at(size_type index)
Wrapper around std::vector member function.
Definition: WMixinVector.h:425
vector_type::reference reference
Compares to std::vector type.
Definition: WMixinVector.h:82
void swap(WMixinVector &other)
Wrapper around std::vector member function.
Definition: WMixinVector.h:247
vector_type::const_reference const_reference
Compares to std::vector type.
Definition: WMixinVector.h:77
size_type capacity() const
Wrapper around std::vector member function.
Definition: WMixinVector.h:277
void clear()
Wrapper around std::vector member function.
Definition: WMixinVector.h:206
reference back()
Wrapper around std::vector member function.
Definition: WMixinVector.h:547
void insert(iterator where, size_type count, const value_type &value)
Wrapper around std::vector member function.
Definition: WMixinVector.h:527