Cinder  0.9.1
Public Types | Public Member Functions | List of all members
cinder::ConcurrentCircularBuffer< T > Class Template Reference

#include <ConcurrentCircularBuffer.h>

Inherits cinder::Noncopyable.

Public Types

typedef boost::circular_buffer< T > container_type
 
typedef container_type::size_type size_type
 
typedef container_type::value_type value_type
 
typedef boost::call_traits< value_type >::param_type param_type
 

Public Member Functions

 ConcurrentCircularBuffer (size_type capacity)
 
void pushFront (param_type item)
 
void popBack (value_type *pItem)
 
bool tryPushFront (param_type item)
 
bool tryPopBack (value_type *pItem)
 
bool isNotEmpty () const
 
bool isNotFull () const
 
void cancel ()
 
size_t getCapacity () const
 
size_t getSize () const
 

Member Typedef Documentation

template<typename T >
typedef boost::circular_buffer<T> cinder::ConcurrentCircularBuffer< T >::container_type
template<typename T >
typedef container_type::size_type cinder::ConcurrentCircularBuffer< T >::size_type
template<typename T >
typedef container_type::value_type cinder::ConcurrentCircularBuffer< T >::value_type
template<typename T >
typedef boost::call_traits<value_type>::param_type cinder::ConcurrentCircularBuffer< T >::param_type

Constructor & Destructor Documentation

template<typename T >
cinder::ConcurrentCircularBuffer< T >::ConcurrentCircularBuffer ( size_type  capacity)
explicit

Member Function Documentation

template<typename T >
void cinder::ConcurrentCircularBuffer< T >::pushFront ( param_type  item)
template<typename T >
void cinder::ConcurrentCircularBuffer< T >::popBack ( value_type pItem)
template<typename T >
bool cinder::ConcurrentCircularBuffer< T >::tryPushFront ( param_type  item)

Attempts to push item to the front of the buffer, but does not wait for an availability. Returns success as true or false.

template<typename T >
bool cinder::ConcurrentCircularBuffer< T >::tryPopBack ( value_type pItem)

Attempts to pop an item from the back of the buffer, but does not wait for an availability. Returns success as true or false.

template<typename T >
bool cinder::ConcurrentCircularBuffer< T >::isNotEmpty ( ) const
template<typename T >
bool cinder::ConcurrentCircularBuffer< T >::isNotFull ( ) const
template<typename T >
void cinder::ConcurrentCircularBuffer< T >::cancel ( )
template<typename T >
size_t cinder::ConcurrentCircularBuffer< T >::getCapacity ( ) const

Returns the number of items the buffer can hold.

template<typename T >
size_t cinder::ConcurrentCircularBuffer< T >::getSize ( ) const

Returns the number of items the buffer is currently holding.


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