A bounded queue that uses the move semantics and that is thread safe.
TValue | The value type. This type requires a move constructor and a move assignment operator. |
Inherits Rx::LFR::CPimpl< CImageQueue_Impl, Interfaces::EImageQueue::ID >.
Public Member Functions | |
CImageQueue () | |
Default constructor. More... | |
CImageQueue (CImageQueue &&xImageQueue) | |
Move constructor. More... | |
~CImageQueue () | |
Destructor. More... | |
void | Clear () |
Clears this object to its blank/initial state. More... | |
size_t | GetFreeSize () const |
Gets the free size. This is the maximum queue size minus the current queue size. More... | |
CImageQueue_Impl & | GetImpl () |
Gets the non constant implementation. More... | |
const CImageQueue_Impl & | GetImpl () const |
Gets the constant implementation. More... | |
void * | GetInterface (Interfaces::EImageQueue::ID eInterface) |
Gets the interface defined by the given interface ID. More... | |
const void * | GetInterface (Interfaces::EImageQueue::ID eInterface) const |
Gets the interface defined by the given interface ID. More... | |
TInterface * | GetInterface (Interfaces::EImageQueue::ID eInterface) |
Gets the interface defined by the given interface ID. More... | |
const TInterface * | GetInterface (Interfaces::EImageQueue::ID eInterface) const |
Gets the interface defined by the given interface ID. More... | |
const size_t & | GetMaxQueueSize () const |
Gets the maximum queue size. More... | |
void * | GetNotEmptyEventWin32Handle () const |
Gets the windows handle of the not empty event. This can be used in functions like WaitForSingleObject. More... | |
bool | GetOverwriteEnabled () const |
Gets the overwrite enabled flag. More... | |
size_t | GetSize () const |
Gets the current queue size. More... | |
bool | HasInterface (Interfaces::EImageQueue::ID eInterface) |
Queries if this object has the given interface. More... | |
void | Initialize (size_t nMaxQueueSize, bool bOverwriteEnabled) |
Sets the maximum queue size and clears the queue. More... | |
bool | IsEmpty () const |
Query if this queue is empty. More... | |
bool | MoveIn (Rx::CRxImage &&xImage) |
Moves the given image at the end of the queue. This signals the not-empty-event. More... | |
bool | MoveOut (Rx::CRxImage &xImage) |
Moves the first image out of the queue. This resets the not-empty-event if the queue is now empty. More... | |
CImageQueue & | operator= (CImageQueue &&xImageQueue) |
Move assignment operator. More... | |
bool | WaitForNotEmpty (int iMilliseconds=-1) const |
Waits. More... | |
Rx::LFR::CImageQueue::CImageQueue | ( | ) |
Default constructor.
Rx::LFR::CImageQueue::CImageQueue | ( | CImageQueue && | xImageQueue | ) |
Move constructor.
xImageQueue | [in,out] The native image queue. |
Rx::LFR::CImageQueue::~CImageQueue | ( | ) |
Destructor.
void Rx::LFR::CImageQueue::Clear | ( | ) |
Clears this object to its blank/initial state.
size_t Rx::LFR::CImageQueue::GetFreeSize | ( | ) | const |
Gets the free size. This is the maximum queue size minus the current queue size.
|
inlineinherited |
Gets the non constant implementation.
|
inlineinherited |
Gets the constant implementation.
|
inherited |
Gets the interface defined by the given interface ID.
eInterface | The interface ID. |
|
inherited |
Gets the interface defined by the given interface ID.
eInterface | The interface ID. |
|
inlineinherited |
Gets the interface defined by the given interface ID.
TInterface | The interface type. |
eInterface | The interface. |
|
inlineinherited |
Gets the interface defined by the given interface ID.
TInterface | The interface type. |
eInterface | The interface ID. |
const size_t& Rx::LFR::CImageQueue::GetMaxQueueSize | ( | ) | const |
Gets the maximum queue size.
void* Rx::LFR::CImageQueue::GetNotEmptyEventWin32Handle | ( | ) | const |
Gets the windows handle of the not empty event. This can be used in functions like WaitForSingleObject.
bool Rx::LFR::CImageQueue::GetOverwriteEnabled | ( | ) | const |
Gets the overwrite enabled flag.
size_t Rx::LFR::CImageQueue::GetSize | ( | ) | const |
Gets the current queue size.
|
inlineinherited |
Queries if this object has the given interface.
eInterface | The interface to query. |
void Rx::LFR::CImageQueue::Initialize | ( | size_t | nMaxQueueSize, |
bool | bOverwriteEnabled | ||
) |
Sets the maximum queue size and clears the queue.
nMaxQueueSize | The maximum queue size. |
bOverwriteEnabled | True to enable overwriting of the oldest queue element if the queue is full on MoveIn. |
bool Rx::LFR::CImageQueue::IsEmpty | ( | ) | const |
Query if this queue is empty.
bool Rx::LFR::CImageQueue::MoveIn | ( | Rx::CRxImage && | xImage | ) |
Moves the given image at the end of the queue. This signals the not-empty-event.
xImage | [in,out] The image to move into the queue. May be invalid after this call. |
bool Rx::LFR::CImageQueue::MoveOut | ( | Rx::CRxImage & | xImage | ) |
Moves the first image out of the queue. This resets the not-empty-event if the queue is now empty.
xImage | [out] The first image of the queue. |
CImageQueue& Rx::LFR::CImageQueue::operator= | ( | CImageQueue && | xImageQueue | ) |
Move assignment operator.
xImageQueue | [in,out]The image queue instance. |
bool Rx::LFR::CImageQueue::WaitForNotEmpty | ( | int | iMilliseconds = -1 | ) | const |
Waits.
iMilliseconds | (Optional) The maximal waiting time in milliseconds. if iMilliseconds is set to -1 the time is set to infinite. |