|
Qore Programming Language
0.9.16
|
32 #ifndef _QORE_OUTPUTSTREAM_H
33 #define _QORE_OUTPUTSTREAM_H
35 #include "qore/StreamBase.h"
37 DLLEXPORT
extern QoreClass* QC_OUTPUTSTREAM;
60 xsink->
raiseException(
"OUTPUT-STREAM-CLOSED-ERROR",
"this %s object has been already closed",
getName());
131 #endif // _QORE_OUTPUTSTREAM_H
OutputStream()=default
Constructor.
Interface for private data of output streams.
Definition: OutputStream.h:44
DLLEXPORT qore_size_t size() const
returns number of bytes in the string (not including the null pointer)
virtual void close(ExceptionSink *xsink)=0
Flushes any buffered (unwritten) bytes, closes the output stream and releases resources.
defines a Qore-language class
Definition: QoreClass.h:239
virtual const DLLLOCAL 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
DLLLOCAL bool check(ExceptionSink *xsink)
Checks that the current thread is the same as when the instance was created or assigned via unassignT...
Definition: OutputStream.h:54
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:81
virtual void write(const void *ptr, int64 count, ExceptionSink *xsink)=0
Writes bytes to the output stream.
const DLLEXPORT char * c_str() const
returns the string's buffer; this data should not be changed
DLLEXPORT qore_size_t size() const
returns the number of bytes in the object
Base class for private data of stream implementations in C++.
Definition: StreamBase.h:44
DLLEXPORT AbstractQoreNode * raiseException(const char *err, const char *fmt,...)
appends a Qore-language exception to the list
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
const DLLEXPORT void * getPtr() const
returns the pointer to the data
DLLLOCAL void writeHelper(const BinaryNode *data, ExceptionSink *xsink)
Helper method that checks that the current thread is the same as when the instance was created,...
Definition: OutputStream.h:84
virtual bool isClosed()=0
Returns true is the stream has been closed.
holds arbitrary binary data
Definition: BinaryNode.h:41
DLLLOCAL void closeHelper(ExceptionSink *xsink)
Helper method that checks that the current thread is the same as when the instance was created,...
Definition: OutputStream.h:71
DLLLOCAL bool check(ExceptionSink *xsink)
Checks that the current thread is the same as when the instance was created or assigned via unassignT...
Definition: StreamBase.h:53