Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWTPCValBufferBasePrioritized
<Type,PriorityDecorator>


RWTPCValBufferBasePrioritized<Type,PriorityDecorator> (virtual) RWTPCValBufferBaseDecorated<Type,PriorityDecorator>

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Package

Interthread Communication

Header File

#include <rw/itc/RWTPCValBufferBasePrioritized.h>

Description

RWTPCValBufferBasePrioritized<...> is the base class for the family of classes that provide producer-consumer synchronization semantics for exchanging prioritized values between cooperating threads.

In the producer-consumer synchronization model, reader threads (consumers) are blocked while a buffer is empty, and writer threads (producers) are blocked while a buffer is full. A buffer is considered full when the number of unread entries equals or exceeds some user-specified maximum capacity.

The write operations provided by this class and its subclasses bind additional data items to each value prior to storing that value in an internal buffer. One of these additional data items, or decorations, is a priority value that is used during write operations to determine a value's insertion point within the buffer, such that the set of unread values will be retrieved in priority order when eventually read from the buffer. The template parameter PriorityDecorator identifies the class that is used to encapsulate both the data value, priority value, and any other decorations as a single object for storage in the internal buffer. The decorator classes used by subclasses to instantiate this class are intended for the internal use of the library, and are not documented as part of the public interface.

Destructor

virtual
~RWTPCValBufferBasePrioritized();

Inherited Functions

The following superclass functions have been redeclared or redefined to allow them to be overloaded within in this class:

RWBoolean   tryWrite(const Type& value);
void        write(const Type& value);
RWWaitStatus write(const Type& value, unsigned long milliseconds);

Public Member Functions

RWBoolean 
tryWrite(long priority, const Type& value);
void 
write(long priority, const Type& value);
RWWaitStatus 
write(long priority, const Type& value, 
unsigned long milliseconds);

See Also

RWTPCValBufferBaseDecorated<Type,Decorator>,RWTPCValQueuePrioritized<Type>, RWTPCValStackPrioritized<Type>,RWTPCValBufferBaseGuardedPrioritized<...>



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.