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

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 peek (T &msg, Bool wait=True)
 Retrievees the next message from the thread event queue without removing the message from the 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

◆ isInitialized()

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

Retrieves indication if this queue object has been initialized.

Returns
True if initialized, otherwise False.

◆ mode()

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.

◆ peek()

template<class T >
Bool EThreadQueueBase< T >::peek ( T &  msg,
Bool  wait = True 
)
inline

Retrievees the next message from the thread event queue without removing the message from the 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.

◆ pop()

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.

◆ push()

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.

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