Qore Programming Language - C/C++ Library  0.8.13.6
OutputStream Class Referenceabstract

Interface for private data of output streams. More...

#include <OutputStream.h>

Inheritance diagram for OutputStream:
Collaboration diagram for OutputStream:

Public Member Functions

virtual void close (ExceptionSink *xsink)=0
 Flushes any buffered (unwritten) bytes, closes the output stream and releases resources. More...
 
virtual void write (const void *ptr, int64 count, ExceptionSink *xsink)=0
 Writes bytes to the output stream. More...
 
- Public Member Functions inherited from AbstractPrivateData
virtual DLLLOCAL void deref (ExceptionSink *xsink)
 decrements the reference count of the object More...
 
virtual DLLLOCAL void deref ()
 decrements the reference count of the object without the possibility of throwing a Qore-language exception
 
DLLLOCAL void ref ()
 increments the reference count of the object More...
 
- Public Member Functions inherited from QoreReferenceCounter
DLLEXPORT QoreReferenceCounter ()
 creates the reference counter object
 
DLLEXPORT QoreReferenceCounter (const QoreReferenceCounter &old)
 creates a new object with a reference count of 1 More...
 
DLLEXPORT ~QoreReferenceCounter ()
 destroys the reference counter object
 
DLLEXPORT bool is_unique () const
 returns true if the reference count is 1 More...
 
DLLEXPORT int reference_count () const
 gets the reference count More...
 
DLLEXPORT bool ROdereference () const
 atomically decrements the reference count More...
 
DLLEXPORT void ROreference () const
 atomically increments the reference count
 

Protected Member Functions

 OutputStream ()=default
 Constructor.
 
- Protected Member Functions inherited from AbstractPrivateData
virtual DLLLOCAL ~AbstractPrivateData ()
 as these objects are reference counted, the destructor should be called only when the reference count = 0 and not manually
 

Detailed Description

Interface for private data of output streams.

Methods in this interface serve as low-level API for using output streams from C++ code.

Member Function Documentation

◆ close()

virtual void OutputStream::close ( ExceptionSink xsink)
pure virtual

Flushes any buffered (unwritten) bytes, closes the output stream and releases resources.

Parameters
xsinkthe exception sink

◆ write()

virtual void OutputStream::write ( const void *  ptr,
int64  count,
ExceptionSink xsink 
)
pure virtual

Writes bytes to the output stream.

Parameters
ptrthe source buffer to write to the stream
countthe number of bytes to write, must be >= 0
xsinkthe exception sink

The documentation for this class was generated from the following file: