26 #ifndef CPN_QUEUE_QUEUEWRITERADAPTOR_H
27 #define CPN_QUEUE_QUEUEWRITERADAPTOR_H
57 return (T*)
queue->GetRawEnqueuePtr(GetTypeSize<T>() * thresh, chan);
65 queue->Enqueue(GetTypeSize<T>() * count);
73 void Enqueue(
const T* data,
unsigned count) {
74 queue->RawEnqueue((
void*)data, GetTypeSize<T>() * count);
84 void Enqueue(
const T* data,
unsigned count,
unsigned numChans,
unsigned chanStride) {
85 queue->RawEnqueue((
void*)data, GetTypeSize<T>() * count,
86 numChans, GetTypeSize<T>() * chanStride);
T * GetEnqueuePtr(unsigned thresh, unsigned chan=0)
A template class to do type conversion for the writer end of the queue.
unsigned QueueLength() const
unsigned NumChannels() const
void Enqueue(unsigned count)
void Release()
Release the writer, further operations are invalid.
The exceptions specified for the CPN network.
void Enqueue(const T *data, unsigned count, unsigned numChans, unsigned chanStride)
An exception indicating that there is a type mismatch in the queue.
shared_ptr< QueueWriter > queue
Definition for the Queue writer inteface.
bool TypeCompatable(const std::string &type1, const std::string &type2)
unsigned Freespace() const
shared_ptr< QueueWriter > GetWriter()
unsigned ChannelStride() const
unsigned MaxThreshold() const
void Enqueue(const T *data, unsigned count)
OQueue(shared_ptr< QueueWriter > q)
Defintions of and helper functions for queue datatypes.