Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TProducerConsumerQueue
Inherited By:
None.
Purpose:
This provides a concrete implementation of the TProducerConsumerQueue. It uses a TDeque for the implementation.
Instantiation:
Always allocate on the heap.
Deriving Classes:
None.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
- TStandardProducerConsumerQueue ()
- TStandardProducerConsumerQueue (MCollectibleCompareFn testfn)
Interface Category:
API.
Purpose:
- Default constructor.
- The comparison function to use. Generally IsSame or IsEqual.
Calling Context:
- Called by the stream-in operators and directly.
- Call this function directly.
Parameters:
- Takes no parameters.
- MCollectibleCompareFn testfn -Comparision function to use when removing.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual ~ TStandardProducerConsumerQueue ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object. Call this function directly.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool HandleAdd (MCollectible *)
Interface Category:
API.
Purpose:
Adds the object to its internal collection of objects. The implementation is left up to the derived class.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the object was successfully added.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual MCollectible * HandleRemoveNext ()
Interface Category:
API.
Purpose:
Removes the next object from the queue.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the next object on the queue.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool HandleIsFull ()
Interface Category:
API.
Purpose:
Derived classes of the producer consumer queue should override this member function to return true if they can no longer accept objects. This is called every time an object is removed from the queue to determine when space becomes available.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the queue is full.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual unsigned long HandleCount () const
Interface Category:
API.
Purpose:
Used by the Count member function to obtain the actual number of objects in the queue.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns the number of objects in the queue.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.