EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
EThreadQueueBase< T > Class Template Reference

Defines the functionality for the thread queue. More...

#include <etevent.h>

Inheritance diagram for EThreadQueueBase< T >:
EThreadQueuePrivate< T > EThreadQueuePublic< T >

Public Member Functions

Int queueSize () const
 Returns the maximum number of events that can be present in the event queue. More...
 
Bool push (const T &msg, Bool wait=True)
 Adds the specified message to the thread event queue. More...
 
Bool pop (T &msg, Bool wait=True)
 Removes the next message from the thread event queue. More...
 
Bool isInitialized ()
 Retrieves indication if this queue object has been initialized. More...
 
EThreadQueueMode mode ()
 Retrieves the access mode associated with this queue object. More...
 

Detailed Description

template<class T>
class EThreadQueueBase< T >

Defines the functionality for the thread queue.

This is a templated class. The template parameter is the message class. This allows for a developer to provide a custom event message definition.

Member Function Documentation

template<class T >
Bool EThreadQueueBase< T >::isInitialized ( )
inline

Retrieves indication if this queue object has been initialized.

Returns
True if initialized, otherwise False.
template<class T >
EThreadQueueMode EThreadQueueBase< T >::mode ( )
inline

Retrieves the access mode associated with this queue object.

Returns
the access mode associated with this queue object.
template<class T >
Bool EThreadQueueBase< T >::pop ( T &  msg,
Bool  wait = True 
)
inline

Removes the next message from the thread event queue.

Parameters
msga reference to a message object that will be populated with the message.
waitindicates whether this function should wait for space to become available in the queue.
Returns
True indicates that a message was successfully popped from the queue, otherwise False.
template<class T >
Bool EThreadQueueBase< T >::push ( const T &  msg,
Bool  wait = True 
)
inline

Adds the specified message to the thread event queue.

Parameters
msga reference to the message to add.
waitindicates whether this function should wait for space to become available in the queue.
Returns
True indicates that the message was successfully added to the queue, otherwise False. This function can only return False if wait is False.
template<class T >
Int EThreadQueueBase< T >::queueSize ( ) const
inline

Returns the maximum number of events that can be present in the event queue.

Returns
The maximum number of events that can be present in the event queue.

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