oeostream
class oeostream : public oestream
This class represents oeostream.
Defines the platform independent interface and implementation for a generic output data stream class.
The following methods are publicly inherited from oestream:
- The following classes derive from this class:
Constructors
oeostream() -> oeostream
oeostream(arg2: oeostream) -> oeostream
Creates an instance of an oeostream. This class is designed to provide an interface and some functionality; however, this class does not define a data target and therefore writing data to an instance of this is equivalent to writing to null.
close
close() -> None
Flushes the remaining data in the output buffer and then closes the
stream. After the stream has been closed, it is then initialized
and ready to be opened. Before this stream can be reused, it must
first be opened with oeostream.open.
Any attempts to write to this stream
before it has been opened will fail.
flush
flush() -> bool
Flushes the remaining data in the output buffer onto the stream and returns whether or not it was successful. Explicit calls to this function are only necessary when one needs to make sure that all of the data that has been stored in the output buffer is actually on the output stream at that time. The output buffer is automatically flushed when it becomes full.
open
open(name: str) -> bool
open(buffer: str, len: oesize_t) -> bool
Opens the output stream to the specified sources. Passing a ‘name’ parameter will result in invocation of a protected virtual method to appropriate handle the specified output source. Passing a pointer to a character buffer along with the buffer’s size will result in the stream wrapping the ‘buffer’ and using that as the stream data destination. Returns whether or not data can now be written to the stream.
putbyte
putbyte(c: str) -> bool
Pushes the specified byte ‘c’ onto the output stream and returns whether or not this was successful.
write
write(buffer: str, len: oesize_t) -> oesize_t
write(str: signed, len: oesize_t) -> oesize_t
Writes ‘len’ number of bytes from the specified data source (‘buffer’) onto the output stream and returns the number of bytes that were able to be written.