MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.db.stream.DataItemCollection Class Reference

The DataItemCollection contains the collection of synchronized data items collected from all custom queries. More...

Public Member Functions

 DataItemCollection (int nAtCount)
 The constructor. More...
 
bool WaitForCount (int nWait)
 The WaitForCount function waits for the data queue to either fill to a given number of items (e.g. the 'at count'), or if no items remain in the queue and the query end has been reached, or the cancel event has been set. More...
 
void Add (DataItem di)
 Add a new data item to the queue. More...
 
DataItem GetData (int nWait)
 Returns the next data item from the back of the queue. More...
 
bool WaitData (int nWait)
 The WaitData function waits a given amount of time for data to be ready. More...
 
void Clear ()
 The Clear method removes all data from the data queue. More...
 

Properties

int Count [get]
 Returns the number of items in the queue. More...
 
CancelEvent Cancel [get]
 Cancels the internal WaitForCount. More...
 
ManualResetEvent QueryEnd [get]
 The QueryEnd is set when the data reaches the data end. More...
 

Detailed Description

The DataItemCollection contains the collection of synchronized data items collected from all custom queries.

Definition at line 15 of file DataItemCollection.cs.

Constructor & Destructor Documentation

◆ DataItemCollection()

MyCaffe.db.stream.DataItemCollection.DataItemCollection ( int  nAtCount)

The constructor.

Parameters
nAtCountSpecifies the number of items that trigger the 'AtCount' event.

Definition at line 29 of file DataItemCollection.cs.

Member Function Documentation

◆ Add()

void MyCaffe.db.stream.DataItemCollection.Add ( DataItem  di)

Add a new data item to the queue.

Parameters
diSpecifies the synchronized data item.

Definition at line 107 of file DataItemCollection.cs.

◆ Clear()

void MyCaffe.db.stream.DataItemCollection.Clear ( )

The Clear method removes all data from the data queue.

Definition at line 157 of file DataItemCollection.cs.

◆ GetData()

DataItem MyCaffe.db.stream.DataItemCollection.GetData ( int  nWait)

Returns the next data item from the back of the queue.

Parameters
nWaitSpecifies the amount of time to wait for the data.
Returns
The synchronized data item is returned.

Definition at line 124 of file DataItemCollection.cs.

◆ WaitData()

bool MyCaffe.db.stream.DataItemCollection.WaitData ( int  nWait)

The WaitData function waits a given amount of time for data to be ready.

Parameters
nWaitSpecifies the amount of time to wait.
Returns
When data is ready, true is returned, otherwise false is returned.

Definition at line 149 of file DataItemCollection.cs.

◆ WaitForCount()

bool MyCaffe.db.stream.DataItemCollection.WaitForCount ( int  nWait)

The WaitForCount function waits for the data queue to either fill to a given number of items (e.g. the 'at count'), or if no items remain in the queue and the query end has been reached, or the cancel event has been set.

Parameters
nWaitSpecifies the maximum amount of time to wait.
Returns
true is returned if there is an 'at count' amount of data in the queue, otherwise false is returned.

Definition at line 64 of file DataItemCollection.cs.

Property Documentation

◆ Cancel

CancelEvent MyCaffe.db.stream.DataItemCollection.Cancel
get

Cancels the internal WaitForCount.

Definition at line 45 of file DataItemCollection.cs.

◆ Count

int MyCaffe.db.stream.DataItemCollection.Count
get

Returns the number of items in the queue.

Definition at line 37 of file DataItemCollection.cs.

◆ QueryEnd

ManualResetEvent MyCaffe.db.stream.DataItemCollection.QueryEnd
get

The QueryEnd is set when the data reaches the data end.

Definition at line 53 of file DataItemCollection.cs.


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