32 #ifndef _QORE_STDOUTOUTPUTSTREAM_H 
   33 #define _QORE_STDOUTOUTPUTSTREAM_H 
   35 #include "qore/OutputStream.h" 
   47       return "StdoutOutputStream";
 
   62       const char* current = 
reinterpret_cast<const char*
>(ptr);
 
   63       int64 blockCount = count / WRITE_BLOCK_SIZE;
 
   64       for (
int64 i = 0; i < blockCount; i++) {
 
   65          fwrite(current, WRITE_BLOCK_SIZE, 1, stdout);
 
   66          current = (current + WRITE_BLOCK_SIZE);
 
   67          count -= WRITE_BLOCK_SIZE;
 
   69       fwrite(ptr, count, 1, stdout);
 
   72    static const int WRITE_BLOCK_SIZE = 1024;
 
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
 
Private data for the Qore::StdoutOutputStream class.
Definition: StdoutOutputStream.h:40
 
DLLLOCAL void close(ExceptionSink *xsink) override
Flushes any buffered (unwritten) bytes, closes the output stream and releases resources.
Definition: StdoutOutputStream.h:54
 
DLLLOCAL const char * getName() override
Returns the name of the class.
Definition: StdoutOutputStream.h:46
 
DLLLOCAL bool isClosed() override
Returns true is the stream has been closed.
Definition: StdoutOutputStream.h:50
 
DLLLOCAL void write(const void *ptr, int64 count, ExceptionSink *xsink) override
Writes bytes to the output stream.
Definition: StdoutOutputStream.h:58
 
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