DC_PipeOutStream_t Class Reference

Output stream. More...

#include <dc_filterservice.h>

List of all members.

Public Methods

char* getName (void)
bool isEndOfWork (void)
bool isEndOfStream (void)
int write (DC_Buffer_t *pbuf, void *pUserArg=NULL)
int write (DC_Buffer_t &buf, void *pUserArg=NULL)
int write_nocopy (DC_Buffer_t *pbuf, void *pUserArg=NULL)
int write_nocopy (DC_Buffer_t &buf, void *pUserArg=NULL)
int close (bool fEndOfWork=false)


Detailed Description

Output stream.

This is passed into filter objects for accessing the streams, and are local to each filter thread (other than the pointers to potentially shared (colocated) DC_Remote objects).

write() does a deep copy of the buffer object and memory region as needed to allow the caller to modify the buffer immediately after this call returns. For example, a colocated sink will cause the buffer object and memory region to be duplicated and placed directly in the consumer's queue.

pUserArg is used for when there is a user-defined stream write policy in use. This extra arg is passed to the policy.write_copyset() callback to help decide which copyset the buffer should be directed to. A typical example would be to more simply pass along metadata, such as spatial location information, along with a data chunk to avoid needing to decode the whole data buffer to decide where it should be sent.

write_nocopy() uses the given buffer. If colocated with the sink this will be deposited directly in that Queue. Use of stack allocated DC_Buffer_t objects for this call is not recommended due to undesirable results if the stack frame is removed before the object is dequeued/used by a colocated consumer.

pUserArg is used for when there is a user-defined stream write policy in use. This extra arg is passed to the policy.write_copyset() callback to help decide which copyset the buffer should be directed to. A typical example would be to more simply pass along metadata, such as spatial location information, along with a data chunk to avoid needing to decode the whole data buffer to decide where it should be sent.


Member Function Documentation

int DC_PipeOutStream_t::write_nocopy ( DC_Buffer_t & buf,
void * pUserArg = NULL ) [inline]
 

Be VERY careful using this version with local vars on the stack, since it could be needed long after the write call if we are colocated with the consumer.


The documentation for this class was generated from the following file:
Generated at Mon Mar 3 13:53:22 2003 for DataCutter by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001