Raytrix Light Field SDK  4.0
Logo
Public Member Functions | List of all members
Rx::LFR::Net::ImageQueue Class Reference

Detailed Description

Defines an image queue.

Inherits NativeWrapper< Rx::LFR::CImageQueue >.

Public Member Functions

 ImageQueue ()
 Default constructor. More...
 
 ImageQueue (Rx::LFR::CImageQueue &xNative)
 Constructor. More...
 
 ~ImageQueue ()
 Destructor. More...
 
void Clear ()
 Clears this object to its blank/initial state. More...
 
bool CopyIn (Rx::LFR::Net::ConstImage^ xConstImage)
 Copies a const image into the image queue. More...
 
size_t GetFreeSize ()
 Gets the free size. This is the maximum queue size minus the current queue size. More...
 
size_t GetMaxQueueSize ()
 Gets the maximum queue size. More...
 
bool GetOverwriteEnabled ()
 Gets the overwrite enabled flag. More...
 
size_t GetSize ()
 Gets the current queue size. More...
 
System::Threading::ManualResetEvent^ GetWaitEvent ()
 Gets the wait event. More...
 
void Initialize (size_t nMaxQueueSize, bool bOverwriteEnabled)
 Sets the maximum queue size and clears the queue. More...
 
bool IsEmpty ()
 Query if this queue is empty. More...
 
bool MoveIn (Rx::Net::Image^ xImage)
 Moves the given image at the end of the queue. This signals the not-empty-event which would end the waiting at the WaitForNotEmpty function. More...
 
bool MoveOut (Rx::Net::Image^ xImage)
 Moves the first image out of the queue. This resets the not-empty-event if the queue is now empty which would cause the waiting using the WaitForNotEmpty function. More...
 
bool WaitForNotEmpty ()
 Waits for the not empty event. More...
 
bool WaitForNotEmpty (int iMilliseconds)
 Waits for the not empty event. More...
 

Constructor & Destructor Documentation

Rx::LFR::Net::ImageQueue::ImageQueue ( )
inline

Default constructor.

Rx::LFR::Net::ImageQueue::ImageQueue ( Rx::LFR::CImageQueue xNative)
inline

Constructor.

Wraps the given native instance instead of creating an own instance. The given native instance must be valid for the lifetime of this instance.

Parameters
xNative[in] The native instance to be wrapped by this class.
Rx::LFR::Net::ImageQueue::~ImageQueue ( )
inline

Destructor.

Member Function Documentation

void Rx::LFR::Net::ImageQueue::Clear ( )
inline

Clears this object to its blank/initial state.

bool Rx::LFR::Net::ImageQueue::CopyIn ( Rx::LFR::Net::ConstImage xConstImage)
inline

Copies a const image into the image queue.

Parameters
xConstImageThe const image.
Returns
True if it succeeds, false if it fails.
size_t Rx::LFR::Net::ImageQueue::GetFreeSize ( )
inline

Gets the free size. This is the maximum queue size minus the current queue size.

Returns
The free size.
size_t Rx::LFR::Net::ImageQueue::GetMaxQueueSize ( )
inline

Gets the maximum queue size.

Returns
The maximum queue size.
bool Rx::LFR::Net::ImageQueue::GetOverwriteEnabled ( )
inline

Gets the overwrite enabled flag.

Returns
The overwrite enabled flag.
size_t Rx::LFR::Net::ImageQueue::GetSize ( )
inline

Gets the current queue size.

Returns
The current queue size.
System::Threading::ManualResetEvent ^ Rx::LFR::Net::ImageQueue::GetWaitEvent ( )
inline

Gets the wait event.

Returns
Null if it fails, else the wait event.
void Rx::LFR::Net::ImageQueue::Initialize ( size_t  nMaxQueueSize,
bool  bOverwriteEnabled 
)
inline

Sets the maximum queue size and clears the queue.

Parameters
nMaxQueueSizeThe maximum queue size.
bOverwriteEnabledTrue to enable overwriting of the oldest queue element if the queue is full on MoveIn.
bool Rx::LFR::Net::ImageQueue::IsEmpty ( )
inline

Query if this queue is empty.

Returns
True if empty, false if not.
bool Rx::LFR::Net::ImageQueue::MoveIn ( Rx::Net::Image xImage)
inline

Moves the given image at the end of the queue. This signals the not-empty-event which would end the waiting at the WaitForNotEmpty function.

Parameters
xImage[in,out] The image to move into the queue. May be invalid after this call.
Returns
True if it succeeds, false if the queue is full and overwrite is disabled.
bool Rx::LFR::Net::ImageQueue::MoveOut ( Rx::Net::Image xImage)
inline

Moves the first image out of the queue. This resets the not-empty-event if the queue is now empty which would cause the waiting using the WaitForNotEmpty function.

Parameters
xImage[out] The first image of the queue.
Returns
True if it succeeds, false if the queue is empty.
bool Rx::LFR::Net::ImageQueue::WaitForNotEmpty ( )
inline

Waits for the not empty event.

Returns
True if it succeeds, false if it fails.
bool Rx::LFR::Net::ImageQueue::WaitForNotEmpty ( int  iMilliseconds)
inline

Waits for the not empty event.

Parameters
iMillisecondsZero-based index of the milliseconds.
Returns
True if it succeeds, false if it fails.