|
CPN
Computational Process Networks
|
Definition of the reader portion of the CPN queue class. More...
#include <QueueReader.h>
Collaboration diagram for CPN::QueueReader:Public Member Functions | |
| QueueReader (QueueReleaser *n, shared_ptr< QueueBase > q) | |
| ~QueueReader () | |
| const void * | GetRawDequeuePtr (unsigned thresh, unsigned chan=0) |
| void | Dequeue (unsigned count) |
| bool | RawDequeue (void *data, unsigned count, unsigned numChans, unsigned chanStride) |
| bool | RawDequeue (void *data, unsigned count) |
| void | Reset () |
| bool | Flushed () const |
| unsigned | NumChannels () const |
| unsigned | MaxThreshold () const |
| unsigned | QueueLength () const |
| unsigned | Count () const |
| bool | Empty () const |
| const std::string & | GetDatatype () const |
| unsigned | ChannelStride () const |
| Key_t | GetKey () const |
| void | Release () |
| void | NotifyTerminate () |
| Called by the node. More... | |
| shared_ptr< QueueBase > | GetQueue () |
Private Attributes | |
| QueueReleaser * | releaser |
| shared_ptr< QueueBase > | queue |
Definition of the reader portion of the CPN queue class.
Definition at line 37 of file QueueReader.h.
| CPN::QueueReader::QueueReader | ( | QueueReleaser * | n, |
| shared_ptr< QueueBase > | q | ||
| ) |
Definition at line 31 of file QueueReader.cc.
| CPN::QueueReader::~QueueReader | ( | ) |
| unsigned CPN::QueueReader::ChannelStride | ( | ) | const |
Definition at line 73 of file QueueReader.cc.
References queue.
| unsigned CPN::QueueReader::Count | ( | ) | const |
An accessor method for the number of elements currently in the queue.
Definition at line 65 of file QueueReader.cc.
References queue.
| void CPN::QueueReader::Dequeue | ( | unsigned | count | ) |
This function is used to remove elements from the queue. count elements will be removed from the queue when this function is called.
| count | the number of bytes to remove from the queue |
Definition at line 44 of file QueueReader.cc.
References queue.
| bool CPN::QueueReader::Empty | ( | ) | const |
Definition at line 67 of file QueueReader.cc.
References queue.
| bool CPN::QueueReader::Flushed | ( | ) | const |
| const std::string & CPN::QueueReader::GetDatatype | ( | ) | const |
| Key_t CPN::QueueReader::GetKey | ( | ) | const |
Definition at line 75 of file QueueReader.cc.
References queue.
Referenced by Release().
Here is the caller graph for this function:
|
inline |
Definition at line 150 of file QueueReader.h.
| const void * CPN::QueueReader::GetRawDequeuePtr | ( | unsigned | thresh, |
| unsigned | chan = 0 |
||
| ) |
Get a pointer to a buffer containing elements.
| thresh | the number of bytes to get |
| chan | the channel to use |
Definition at line 40 of file QueueReader.cc.
References queue.
| unsigned CPN::QueueReader::MaxThreshold | ( | ) | const |
Definition at line 61 of file QueueReader.cc.
References queue.
| void CPN::QueueReader::NotifyTerminate | ( | ) |
| unsigned CPN::QueueReader::NumChannels | ( | ) | const |
Definition at line 59 of file QueueReader.cc.
References queue.
| unsigned CPN::QueueReader::QueueLength | ( | ) | const |
| bool CPN::QueueReader::RawDequeue | ( | void * | data, |
| unsigned | count, | ||
| unsigned | numChans, | ||
| unsigned | chanStride | ||
| ) |
Dequeue data from the queue directly into the memory pointed to by data. This function shall be equivalent to a call to GetRawDequeuePtr then a memcpy and then a call to Dequeue.
| data | poiner to memory to dequeue to |
| count | the number of bytes to copy into data |
| numChans | the number of channels to write to |
| chanStride | the distance in bytes between the beginning of the channels in data. |
Definition at line 46 of file QueueReader.cc.
References queue.
| bool CPN::QueueReader::RawDequeue | ( | void * | data, |
| unsigned | count | ||
| ) |
A version of RawDequeue to use when there is only 1 channel.
| data | the data to enqueue |
| count | the number of bytes to enqueue |
Definition at line 51 of file QueueReader.cc.
References queue.
| void CPN::QueueReader::Release | ( | ) |
Release the reader and reclame resources, all futher operations are invalid.
Definition at line 79 of file QueueReader.cc.
References GetKey(), queue, releaser, and CPN::QueueReleaser::ReleaseReader().
Here is the call graph for this function:| void CPN::QueueReader::Reset | ( | ) |
|
private |
Definition at line 153 of file QueueReader.h.
Referenced by ChannelStride(), Count(), Dequeue(), Empty(), Flushed(), GetDatatype(), GetKey(), GetRawDequeuePtr(), MaxThreshold(), NotifyTerminate(), NumChannels(), QueueLength(), RawDequeue(), Release(), Reset(), and ~QueueReader().
|
private |
Definition at line 152 of file QueueReader.h.
Referenced by Release().
1.8.5