17 #ifndef HH_SENF_Packets_PacketVector_ 18 #define HH_SENF_Packets_PacketVector_ 1 21 #include <boost/noncopyable.hpp> 22 #include <boost/cstdint.hpp> 23 #include <boost/pool/singleton_pool.hpp> 24 #include <senf/config.hh> 30 #ifndef SENF_PACKET_STD_CONTAINER 39 struct PacketVectorPoolTag {};
40 typedef boost::singleton_pool<
41 PacketVectorPoolTag, 1u << SENF_PACKET_VECTOR_SIZE_INDEX> Pool;
53 static size_type
const ChunkSize = 1u << SENF_PACKET_VECTOR_SIZE_INDEX;
55 static size_type
const HeadRoom = SENF_PACKET_VECTOR_HEADROOM;
56 static size_type
const TailRoom = SENF_PACKET_VECTOR_TAILROOM;
68 PacketVector(size_type requestSize, value_type initValue);
69 template <
class ForwardIterator>
72 size_type chunkSize = 0u, size_type offset = 0u);
83 const_iterator
begin()
const;
84 const_iterator
end()
const;
86 size_type
size()
const;
92 void erase(iterator pos);
93 void erase(iterator first, iterator last);
97 void insert(iterator pos, value_type v);
98 void insert(iterator pos, size_type n, value_type v);
99 template <
class ForwardIterator>
100 void insert(iterator pos, ForwardIterator f, ForwardIterator l);
105 static size_type allocationSize(size_type sz);
106 iterator move(iterator pos, size_type n);
107 iterator moveGrow(iterator pos, size_type n);
108 iterator grow(iterator pos, size_type n);
static size_type const TailRoom
std::ptrdiff_t difference_type
void insert(iterator pos, value_type v)
boost::uint8_t value_type
static size_type const HeadRoom
static size_type const ChunkSize
void truncateFront(iterator pos)
void truncateBack(iterator pos)
value_type const * const_iterator
static size_type const ChunkSizeIndex