Warning, file /include/boost/poly_collection/detail/segment_backend.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_POLY_COLLECTION_DETAIL_SEGMENT_BACKEND_HPP
0010 #define BOOST_POLY_COLLECTION_DETAIL_SEGMENT_BACKEND_HPP
0011
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015
0016 #include <cstddef>
0017 #include <memory>
0018 #include <utility>
0019
0020 namespace boost{
0021
0022 namespace poly_collection{
0023
0024 namespace detail{
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 template<typename Model,typename Allocator>
0035 struct segment_backend
0036 {
0037 using segment_backend_unique_ptr=
0038 std::unique_ptr<segment_backend,void(*)(segment_backend*)>;
0039 using value_pointer=void*;
0040 using const_value_pointer=const void*;
0041 using base_iterator=typename Model::base_iterator;
0042 using const_base_iterator=typename Model::const_base_iterator;
0043 template<typename T>
0044 using const_iterator=typename Model::template const_iterator<T>;
0045 using base_sentinel=typename Model::base_sentinel;
0046 using range=std::pair<base_iterator,base_sentinel>;
0047
0048 segment_backend()=default;
0049 segment_backend(const segment_backend&)=delete;
0050 segment_backend& operator=(const segment_backend&)=delete;
0051
0052 virtual ~segment_backend()=default;
0053 virtual segment_backend_unique_ptr copy()const=0;
0054 virtual segment_backend_unique_ptr copy(const Allocator&)const=0;
0055 virtual segment_backend_unique_ptr empty_copy(const Allocator&)const=0;
0056 virtual segment_backend_unique_ptr move(const Allocator&)=0;
0057 virtual bool equal(const segment_backend&)const=0;
0058
0059 virtual Allocator get_allocator()const noexcept=0;
0060 virtual base_iterator begin()const noexcept=0;
0061 virtual base_iterator end()const noexcept=0;
0062 virtual bool empty()const noexcept=0;
0063 virtual std::size_t size()const noexcept=0;
0064 virtual std::size_t max_size()const noexcept=0;
0065 virtual std::size_t capacity()const noexcept=0;
0066 virtual base_sentinel reserve(std::size_t)=0;
0067 virtual base_sentinel shrink_to_fit()=0;
0068 virtual range push_back(const_value_pointer)=0;
0069 virtual range push_back_move(value_pointer)=0;
0070 virtual range insert(const_base_iterator,const_value_pointer)=0;
0071 virtual range insert_move(const_base_iterator,value_pointer)=0;
0072 virtual range erase(const_base_iterator)=0;
0073 virtual range erase(const_base_iterator,const_base_iterator)=0;
0074 virtual range erase_till_end(const_base_iterator)=0;
0075 virtual range erase_from_begin(const_base_iterator)=0;
0076 virtual base_sentinel clear()noexcept=0;
0077 };
0078
0079 }
0080
0081 }
0082
0083 }
0084
0085 #endif