Scopira 20080306

scopira::tool::circular_vector< T > Class Template Reference

#include <cacheflow.h>

List of all members.

Public Types

typedef T data_type
typedef basic_array< T >::iterator iterator
typedef basic_array< T >
::const_iterator 
const_iterator

Public Member Functions

 circular_vector (size_t reserve_size=0)
 ctor
void reserve (size_t reserve_size)
iterator begin1 (void)
iterator end1 (void)
const_iterator begin1 (void) const
const_iterator end1 (void) const
iterator begin2 (void)
iterator end2 (void)
const_iterator begin2 (void) const
const_iterator end2 (void) const
bool empty (void) const
 (current) buffer empty?
bool full (void) const
 (current) buffer full?
size_t size (void) const
 gets the current (used) size
size_t capacity (void) const
 gets the total capacity of the buffer
size_t free (void) const
 how much room is left
void clear (void)
 pop_all elements
const T & front (void) const
 gets the front item on the buffer
void push_back (const T &item)
 push one element to the back of the buffer
void pop_front (void)
 pop one item from the front of the buffer
void pop_all (void)
 pop_all elements (same as clear())
template<class ITER >
void push_back (ITER head, ITER tail)
 push the given iterator to the buffer
template<class ITER >
ITER pop_front (ITER head, ITER tail)
void push_seek (size_t sz)
 special kind of push
void short_rewind (void)
 special kind of rewind

Protected Attributes

arr_type dm_ary
iterator dm_read
iterator dm_write

Detailed Description

template<class T>
class scopira::tool::circular_vector< T >

A cirtuclar buffer

Author:
Aleksander Demko

Member Function Documentation

template<class T >
template<class ITER >
ITER scopira::tool::circular_vector< T >::pop_front ( ITER  head,
ITER  tail 
)

pop and full the given output iterator returns the actual end that was filled

template<class T >
void scopira::tool::circular_vector< T >::reserve ( size_t  reserve_size)

sets the internal buffer size resets all pointers


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