template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
class sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >
Represents a queue used to dispatch events to a waiting thread.
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
bool sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::empty |
( |
| ) |
|
|
inline |
Indicates that the event queue is empty.
- Returns:
true
if the queue is empty, false
otherwise.
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
T& sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::front |
( |
| ) |
|
|
inline |
Gets the event from the front of the queue.
- Returns:
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
void sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::pop_front |
( |
| ) |
|
|
inline |
Removes the item at front of the queue.
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
void sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::push_back |
( |
const T & |
event | ) |
|
|
inline |
Puts an event to the end of the queue and signals that events are available.
- Parameters:
-
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
void sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::unblock |
( |
| ) |
|
|
inline |
Unblocks waiting threads.
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
bool sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::waitForEvents |
( |
| ) |
|
|
inline |
Blocks the calling thread until events are available in the queue.
- Returns:
true
if events are available, false
if an error occurred.
template<class T, class TimeDurationType = TimeDuration<STTCL_DEFAULT_TIMEDURATIONIMPL>, class SemaphoreType = sttcl::internal::SttclSemaphore<STTCL_DEFAULT_SEMAPHOREIMPL,TimeDurationType>, class MutexType = sttcl::internal::SttclMutex<STTCL_DEFAULT_MUTEXIMPL,TimeDurationType> EAIGNORE_BEGIN, class InnerQueueType = STTCL_DEFAULT_DEQUEIMPL(T) EAIGNORE_END>
bool sttcl::EventQueue< T, TimeDurationType, SemaphoreType, MutexType, InnerQueueType >::waitForEvents |
( |
TimeDurationType |
timeout | ) |
|
|
inline |
Blocks the calling thread until events are available in the queue.
- Returns:
true
if events are available, false
if no events were available within the specified timeout.