Producer Consumer
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions | Properties | List of all members
producerConsumer.IBuffer Interface Reference

Inherited by producerConsumer.AbstractBuffer.

Public Member Functions

bool IsEmpty ()
 Returns true if the buffer is empty, false otherwise More...
 
int Take ()
 Removes and returns the first element from this buffer.
If the buffer is empty, the thread calling Tak() must wait until another thread Puts an element. More...
 
void Add (int element)
 Adds an element to the end of this buffer. More...
 

Properties

int Count [get]
 The number of elements currently in the buffer More...
 

Member Function Documentation

void producerConsumer.IBuffer.Add ( int  element)

Adds an element to the end of this buffer.

Parameters
elementnew element to be added to this buffer

Implemented in producerConsumer.BoundedBuffer, producerConsumer.UnboundedBuffer, and producerConsumer.AbstractBuffer.

bool producerConsumer.IBuffer.IsEmpty ( )

Returns true if the buffer is empty, false otherwise

Returns
true if the buffer is empty, false otherwise

Implemented in producerConsumer.AbstractBuffer.

int producerConsumer.IBuffer.Take ( )

Removes and returns the first element from this buffer.
If the buffer is empty, the thread calling Tak() must wait until another thread Puts an element.

Returns
The first element from this buffer

Implemented in producerConsumer.BoundedBuffer, producerConsumer.AbstractBuffer, and producerConsumer.UnboundedBuffer.

Property Documentation

int producerConsumer.IBuffer.Count
get

The number of elements currently in the buffer


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