32 #ifndef _QORE_OUTPUTSTREAMWRAPPER_H
33 #define _QORE_OUTPUTSTREAMWRAPPER_H
35 #include "qore/OutputStream.h"
51 self->evalMethod(
"close", 0, xsink);
59 memcpy(
const_cast<void *
>(buf->
getPtr()), ptr, count);
62 args->
push(buf.release(), xsink);
63 self->evalMethod(
"write", *args, xsink);
70 DLLLOCAL
virtual const char*
getName()
override {
71 return "OutputStreamWrapper";
holds arbitrary binary data
Definition: BinaryNode.h:41
DLLEXPORT int preallocate(size_t size)
pre-allocates a buffer of a certain size
DLLEXPORT const void * getPtr() const
returns the pointer to the data
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
Interface for private data of output streams.
Definition: OutputStream.h:44
Implements the private data for all subclasses of Qore::OutputStream implemented in the Qore language...
Definition: OutputStreamWrapper.h:40
OutputStreamWrapper(QoreObject *self)
Constructor.
Definition: OutputStreamWrapper.h:47
virtual DLLLOCAL void close(ExceptionSink *xsink) override
Flushes any buffered (unwritten) bytes, closes the output stream and releases resources.
Definition: OutputStreamWrapper.h:50
virtual DLLLOCAL const char * getName() override
Returns the name of the class.
Definition: OutputStreamWrapper.h:70
DLLLOCAL bool isClosed() override
Returns true is the stream has been closed.
Definition: OutputStreamWrapper.h:66
virtual DLLLOCAL void write(const void *ptr, int64 count, ExceptionSink *xsink) override
Writes bytes to the output stream.
Definition: OutputStreamWrapper.h:54
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
DLLEXPORT int push(QoreValue val, ExceptionSink *xsink)
adds a value to the list
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:60
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