opentl::core::util::RingBuffer< _T > Class Template Reference

List of all members.

Public Member Functions

_T & at (std::size_t pos)
 random access operator (with boundary checking)
void clear ()
 clears all recorded entries of this ringbuffer
_T & getLast ()
 returns the last inserted element
_T & operator[] (std::size_t pos)
 random access operator (without boundary checking)
void push (_T &val)
 adds an element to the ringbuffer
void resize (std::size_t size)
 resizes the internal element container
 RingBuffer (std::size_t maxSize=1)
void setMaxSize (std::size_t size)
 sets the maximum size of this ringbuffer (maximum elements stored)
std::size_t size ()
 ~RingBuffer ()
 destructor

Protected Attributes

std::vector< _T > mData
std::size_t mMaxSize

template<typename _T>
class opentl::core::util::RingBuffer< _T >


Constructor & Destructor Documentation

template<typename _T >
opentl::core::util::RingBuffer< _T >::RingBuffer ( std::size_t  maxSize = 1  )  [inline]

template<typename _T >
opentl::core::util::RingBuffer< _T >::~RingBuffer (  )  [inline]

destructor


Member Function Documentation

template<typename _T >
_T& opentl::core::util::RingBuffer< _T >::at ( std::size_t  pos  )  [inline]

random access operator (with boundary checking)

Parameters:
pos index of the element
Returns:
element at the index position

template<typename _T >
void opentl::core::util::RingBuffer< _T >::clear (  )  [inline]

clears all recorded entries of this ringbuffer

template<typename _T >
_T& opentl::core::util::RingBuffer< _T >::getLast (  )  [inline]

returns the last inserted element

Parameters:
last element inserted

template<typename _T >
_T& opentl::core::util::RingBuffer< _T >::operator[] ( std::size_t  pos  )  [inline]

random access operator (without boundary checking)

Parameters:
pos index of the element
Returns:
element at the index position

template<typename _T >
void opentl::core::util::RingBuffer< _T >::push ( _T &  val  )  [inline]

adds an element to the ringbuffer

Parameters:
val element to be added

template<typename _T >
void opentl::core::util::RingBuffer< _T >::resize ( std::size_t  size  )  [inline]

resizes the internal element container

Parameters:
size new size

template<typename _T >
void opentl::core::util::RingBuffer< _T >::setMaxSize ( std::size_t  size  )  [inline]

sets the maximum size of this ringbuffer (maximum elements stored)

Parameters:
size max. number of elements

template<typename _T >
std::size_t opentl::core::util::RingBuffer< _T >::size (  )  [inline]


Member Data Documentation

template<typename _T >
std::vector<_T> opentl::core::util::RingBuffer< _T >::mData [protected]

template<typename _T >
std::size_t opentl::core::util::RingBuffer< _T >::mMaxSize [protected]


Generated on Fri Jul 31 17:38:39 2009 for OpenTL by  doxygen 1.5.8