mn_fixed_sorted_vector.hpp
Go to the documentation of this file.
1 /*
2 *This file is part of the Mini Thread Library (https://github.com/RoseLeBlood/MiniThread ).
3 *Copyright (c) 2018-2021 Amber-Sophia Schroeck
4 *
5 *The Mini Thread Library is free software; you can redistribute it and/or modify
6 *it under the terms of the GNU Lesser General Public License as published by
7 *the Free Software Foundation, version 3, or (at your option) any later version.
8 
9 *The Mini Thread Library is distributed in the hope that it will be useful, but
10 *WITHOUT ANY WARRANTY; without even the implied warranty of
11 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 *General Public License for more details.
13 *
14 *You should have received a copy of the GNU Lesser General Public
15 *License along with the Mini Thread Library; if not, see
16 *<https://www.gnu.org/licenses/>.
17 */
18 #ifndef _MINLIB_346db2dc_fc5f_437f_8cf4_5f2dc34bfcd1_H_
19 #define _MINLIB_346db2dc_fc5f_437f_8cf4_5f2dc34bfcd1_H_
20 
21 #include "mn_fixed_vector.hpp"
22 #include "mn_sorted_vector.hpp"
23 
24 namespace mn {
25  namespace container {
26 
27  template<typename TKey, typename TValue, int TCapacity, class TAllocator, class TCompare = mn::less<TKey> >
28  class basic_fixed_sorted_vector : public basic_sorted_vector<TKey, TValue, TAllocator, TCompare,
29  fixed_vector_storage< basic_pair<TKey, TValue>, TAllocator, TCapacity > > {
31  public:
34  using pointer = typename base_type::pointer;
35  using reference = typename base_type::reference;
37 
38  using iterator = typename base_type::iterator;
40 
42  using size_type = typename base_type::size_type;
44 
46  : base_type(allocator) { }
47 
49  self_type& operator = (const self_type& ) = delete;
50 
51  using base_type::begin;
52  using base_type::end;
53  using base_type::size;
54  using base_type::empty;
55  using base_type::capacity;
56  using base_type::clear;
59  };
60  }
61 }
62 
63 #endif
Definition: mn_fixed_sorted_vector.hpp:29
typename base_type::value_type value_type
Definition: mn_fixed_sorted_vector.hpp:33
typename base_type::size_type size_type
Definition: mn_fixed_sorted_vector.hpp:42
typename base_type::allocator_type allocator_type
Definition: mn_fixed_sorted_vector.hpp:41
self_type & operator=(const self_type &)=delete
typename base_type::pointer pointer
Definition: mn_fixed_sorted_vector.hpp:34
typename base_type::const_iterator const_iterator
Definition: mn_fixed_sorted_vector.hpp:39
typename base_type::difference_type difference_type
Definition: mn_fixed_sorted_vector.hpp:36
typename base_type::reference reference
Definition: mn_fixed_sorted_vector.hpp:35
typename base_type::iterator iterator
Definition: mn_fixed_sorted_vector.hpp:38
typename base_type::iterator_category iterator_category
Definition: mn_fixed_sorted_vector.hpp:32
basic_fixed_sorted_vector(const self_type &)=delete
basic_fixed_sorted_vector(const allocator_type &allocator=allocator_type())
Definition: mn_fixed_sorted_vector.hpp:45
Definition: mn_sorted_vector.hpp:54
iterator begin()
Definition: mn_vector.hpp:173
iterator end()
Definition: mn_vector.hpp:174
size_type capacity()
Definition: mn_vector.hpp:179
const allocator_type & get_allocator() const
Definition: mn_vector.hpp:377
void set_allocator(const allocator_type &allocator)
Definition: mn_vector.hpp:381
size_type size() const
Definition: mn_vector.hpp:176
typename base_type::size_type size_type
Definition: mn_sorted_vector.hpp:59
typename base_type::value_type value_type
Definition: mn_sorted_vector.hpp:60
typename base_type::const_iterator const_iterator
Definition: mn_sorted_vector.hpp:66
typename base_type::pointer pointer
Definition: mn_sorted_vector.hpp:61
typename base_type::reference reference
Definition: mn_sorted_vector.hpp:62
typename base_type::iterator iterator
Definition: mn_sorted_vector.hpp:65
typename base_type::allocator_type allocator_type
Definition: mn_sorted_vector.hpp:67
bool empty() const
Definition: mn_vector.hpp:177
void clear()
Definition: mn_vector.hpp:343
Definition: mn_allocator_typetraits.hpp:25