32#ifndef _QORE_TRANSFORMOUTPUTSTREAM_H
33#define _QORE_TRANSFORMOUTPUTSTREAM_H
35#include "qore/OutputStream.h"
36#include "qore/Transform.h"
41 : os(os), t(t), bufsize(t->outputBufferSize()), closed(false) {
44 DLLLOCAL
const char*
getName()
override {
45 return "TransformOutputStream";
55 std::pair<int64, int64> r = t->apply(
nullptr, 0, buf,
sizeof(buf), xsink);
62 os->write(buf, r.second, xsink);
72 const char *src =
static_cast<const char*
>(ptr);
75 std::pair<int64, int64> r = t->apply(src, len, buf,
sizeof(buf), xsink);
80 os->write(buf, r.second, xsink);
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:50
Interface for private data of output streams.
Definition: OutputStream.h:44
virtual bool isClosed()=0
Returns true is the stream has been closed.
virtual void write(const void *ptr, int64 count, ExceptionSink *xsink)=0
Writes bytes to the output stream.
virtual void close(ExceptionSink *xsink)=0
Flushes any buffered (unwritten) bytes, closes the output stream and releases resources.
manages a reference count of a pointer to a class that takes a simple "deref()" call with no argument...
Definition: ReferenceHolder.h:127
virtual DLLLOCAL const char * getName()=0
Returns the name of the class.
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260