33 #ifndef __H__UG__page_container__
34 #define __H__UG__page_container__
43 template <
class T,
int MAX_PAGE_SIZE = 4096,
44 class Allocator = std::allocator<T> >
63 inline size_t size()
const;
81 inline T*
get_page(
size_t ind)
const;
Definition: page_container.h:46
size_t capacity() const
Definition: page_container_impl.h:89
Allocator::const_reference const_reference
Definition: page_container.h:52
PageContainer()
Definition: page_container_impl.h:47
Allocator::reference reference
Definition: page_container.h:51
size_t m_size
Definition: page_container.h:92
Allocator m_alloc
Definition: page_container.h:93
T * get_page(size_t ind) const
returns the page in which the data for the given index lies
Definition: page_container_impl.h:213
void reserve(size_t size)
Definition: page_container_impl.h:137
size_t get_page_offset(size_t ind) const
returns the offset that a index has in its page
Definition: page_container_impl.h:228
size_t size() const
Definition: page_container_impl.h:82
void resize(size_t size, const T &val=T())
Definition: page_container_impl.h:96
std::vector< T * > m_pages
Definition: page_container.h:90
void clear()
Definition: page_container_impl.h:153
Allocator allocator_type
Definition: page_container.h:48
~PageContainer()
Definition: page_container_impl.h:63
const size_t m_numPageEntries
Definition: page_container.h:91
Allocator::size_type size_type
Definition: page_container.h:49
PageContainer & operator=(const PageContainer &pc)
Definition: page_container_impl.h:74
size_t get_page_index(size_t ind) const
returns the index of the page in which the data for the given index lies
Definition: page_container_impl.h:221
T & operator[](size_t ind)
Definition: page_container_impl.h:160
Allocator::difference_type difference_type
Definition: page_container.h:50
void assign_container(const PageContainer &pc)
Definition: page_container_impl.h:190
void swap(PageContainer &pc)
Definition: page_container_impl.h:176