libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
List of all members | Public Member Functions | Protected Attributes
t3_widget::item_buffer_t< T > Class Template Reference

Class implmementing a mutex-protected queue of items. More...

Public Member Functions

 item_buffer_t (void)
 Create a new key_buffer_t. More...
 
pop_front (void)
 Retrieve and remove the item at the front of the queue. More...
 
void push_back (T item)
 Append an item to the list. More...
 
 ~item_buffer_t (void)
 Destroy the key_buffer_t. More...
 

Protected Attributes

pthread_cond_t cond
 The condition variable used to signal addition to the #keys list. More...
 
std::deque< T > items
 The list of item symbols. More...
 
pthread_mutex_t lock
 The mutex used for the critical section. More...
 

Detailed Description

template<class T>
class t3_widget::item_buffer_t< T >

Class implmementing a mutex-protected queue of items.

Constructor & Destructor Documentation

template<class T>
t3_widget::item_buffer_t< T >::item_buffer_t ( void  )
inline

Create a new key_buffer_t.

template<class T>
t3_widget::item_buffer_t< T >::~item_buffer_t ( void  )
inline

Destroy the key_buffer_t.

Member Function Documentation

template<class T>
T t3_widget::item_buffer_t< T >::pop_front ( void  )
inline

Retrieve and remove the item at the front of the queue.

template<class T>
void t3_widget::item_buffer_t< T >::push_back ( item)
inline

Append an item to the list.

Member Data Documentation

template<class T>
pthread_cond_t t3_widget::item_buffer_t< T >::cond
protected

The condition variable used to signal addition to the #keys list.

template<class T>
std::deque<T> t3_widget::item_buffer_t< T >::items
protected

The list of item symbols.

template<class T>
pthread_mutex_t t3_widget::item_buffer_t< T >::lock
protected

The mutex used for the critical section.