25 #ifndef CPN_QUEUE_QUEUEREADERADAPTER_H
26 #define CPN_QUEUE_QUEUEREADERADAPTER_H
56 return (T*)
queue->GetRawDequeuePtr(GetTypeSize<T>() * thresh, chan);
64 queue->Dequeue(GetTypeSize<T>() * count);
74 return queue->RawDequeue((
void*)data, GetTypeSize<T>() * count);
85 bool Dequeue(T* data,
unsigned count,
unsigned numChans,
unsigned chanStride) {
86 return queue->RawDequeue((
void*)data, GetTypeSize<T>() * count,
87 numChans, GetTypeSize<T>() * chanStride);
99 unsigned Count()
const {
return queue->Count()/GetTypeSize<T>(); }
shared_ptr< QueueReader > GetReader()
const T * GetDequeuePtr(unsigned thresh, unsigned chan=0)
unsigned QueueLength() const
shared_ptr< QueueReader > queue
bool Dequeue(T *data, unsigned count)
The exceptions specified for the CPN network.
bool Dequeue(T *data, unsigned count, unsigned numChans, unsigned chanStride)
An exception indicating that there is a type mismatch in the queue.
The definition of reader end of the queue.
void Release()
Release this reader all further actions are invalid.
Template class to do type conversion for reader end of the queue.
bool TypeCompatable(const std::string &type1, const std::string &type2)
unsigned ChannelStride() const
unsigned MaxThreshold() const
unsigned NumChannels() const
IQueue(shared_ptr< QueueReader > q)
void Dequeue(unsigned count)
Defintions of and helper functions for queue datatypes.