BRE12
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
internal::item_buffer< T, A > Class Template Reference
Inheritance diagram for internal::item_buffer< T, A >:
internal::reservable_item_buffer< T, A >

Public Types

enum  buffer_item_state { no_item =0, has_item =1, reserved_item =2 }
 
typedef T item_type
 

Public Member Functions

 item_buffer ()
 Constructor.
 
void reset ()
 

Protected Types

typedef size_t size_type
 
typedef aligned_pair< item_type, buffer_item_state >::type buffer_item_type
 
typedef A::template rebind< buffer_item_type >::other allocator_type
 

Protected Member Functions

bool buffer_empty ()
 
buffer_item_typeitem (size_type i)
 
bool my_item_valid (size_type i)
 
bool my_item_reserved (size_type i)
 
const item_type & get_my_item (size_t i)
 
void set_my_item (size_t i, const item_type &o)
 
void fetch_item (size_t i, item_type &o)
 
void move_item (size_t to, size_t from)
 
bool place_item (size_t here, const item_type &me)
 
void swap_items (size_t i, size_t j)
 
void destroy_item (size_type i)
 
const item_type & front ()
 
const item_type & back ()
 
void reserve_item (size_type i)
 
void release_item (size_type i)
 
void destroy_front ()
 
void destroy_back ()
 
size_type size (size_t new_tail=0)
 
size_type capacity ()
 
bool buffer_full ()
 
void grow_my_array (size_t minimum_size)
 Grows the internal array.
 
bool push_back (item_type &v)
 
bool pop_back (item_type &v)
 
bool pop_front (item_type &v)
 
void clean_up_buffer (bool reset_pointers)
 

Protected Attributes

buffer_item_typemy_array
 
size_type my_array_size
 
size_type my_head
 
size_type my_tail
 

Static Protected Attributes

static const size_type initial_buffer_size = 4
 

The documentation for this class was generated from the following file: