#include <streambuffer.h>
Public Types | |
enum | { default_buffer_size = 4096 } |
Public Member Functions | |
uint32 | bufferSize () const |
virtual FalconData * | clone () const |
Clones the stream. | |
virtual bool | close () |
Close target stream. | |
void | detach () |
Disengages this transcoder from the underlying stream. | |
virtual bool | errorDescription (::Falcon::String &description) const |
virtual bool | flush () |
Flushes stream buffers. | |
virtual bool | get (uint32 &chr) |
Gets next character from the stream. | |
virtual bool | isStreamBuffer () const |
virtual int64 | lastError () const |
virtual bool | put (uint32 chr) |
Writes a character on the stream. | |
virtual int32 | read (void *buffer, int32 size) |
Reads from target stream. | |
virtual int32 | readAvailable (int32 msecs_timeout, const Sys::SystemData *sysData=0) |
Determines if the stream can be read, possibly with a given timeout. | |
bool | resizeBuffer (uint32 size) |
virtual t_status | status () const |
StreamBuffer (const StreamBuffer &other) | |
StreamBuffer (Stream *underlying, bool bOwn=true, uint32 bufSize=default_buffer_size) | |
virtual int64 | tell () |
virtual bool | truncate (int64 pos=-1) |
Stream * | underlying () const |
Returns the underlying stream used by this transcoder. | |
virtual int32 | write (const void *buffer, int32 size) |
Write to the target stream. | |
virtual int32 | writeAvailable (int32 msecs_timeout, const Sys::SystemData *sysData) |
Determines if the stream can be written, possibly with a given timeout. | |
virtual | ~StreamBuffer () |
Public Attributes | |
enum Falcon::StreamBuffer:: { ... } | enum_default_buffer_size |
Protected Member Functions | |
virtual int64 | seek (int64 pos, e_whence whence) |
Everything except reading straight is to be tested.
Falcon::StreamBuffer::StreamBuffer | ( | Stream * | underlying, | |
bool | bOwn = true , |
|||
uint32 | bufSize = default_buffer_size | |||
) |
Falcon::StreamBuffer::StreamBuffer | ( | const StreamBuffer & | other | ) |
virtual Falcon::StreamBuffer::~StreamBuffer | ( | ) | [virtual] |
uint32 Falcon::StreamBuffer::bufferSize | ( | ) | const [inline] |
virtual FalconData* Falcon::StreamBuffer::clone | ( | ) | const [virtual] |
Clones the stream.
This version returns 0 and sets error to unsupported; subclasses must properly clone the stream.
Reimplemented from Falcon::Stream.
virtual bool Falcon::StreamBuffer::close | ( | ) | [virtual] |
void Falcon::StreamBuffer::detach | ( | ) | [inline] |
Disengages this transcoder from the underlying stream.
virtual bool Falcon::StreamBuffer::errorDescription | ( | ::Falcon::String & | description | ) | const [inline, virtual] |
Reimplemented from Falcon::Stream.
virtual bool Falcon::StreamBuffer::flush | ( | ) | [virtual] |
virtual bool Falcon::StreamBuffer::get | ( | uint32 & | chr | ) | [virtual] |
Gets next character from the stream.
Subclasses must manage both stateful transcoding and properly popping readahead characters from the buffer.
Implements Falcon::Stream.
virtual bool Falcon::StreamBuffer::isStreamBuffer | ( | ) | const [inline, virtual] |
Reimplemented from Falcon::Stream.
virtual int64 Falcon::StreamBuffer::lastError | ( | ) | const [inline, virtual] |
Reimplemented from Falcon::Stream.
virtual bool Falcon::StreamBuffer::put | ( | uint32 | chr | ) | [virtual] |
Writes a character on the stream.
chr | the character to write. |
Reimplemented from Falcon::Stream.
Reads from target stream.
buffer | the buffer where read data will be stored. | |
size | the amount of bytes to read |
Reimplemented from Falcon::Stream.
virtual int32 Falcon::StreamBuffer::readAvailable | ( | int32 | msecs_timeout, | |
const Sys::SystemData * | sysData = 0 | |||
) | [virtual] |
Determines if the stream can be read, possibly with a given timeout.
If sysData is not zero, it will be used to honor concurrent interrupt requests.
Reimplemented from Falcon::Stream.
bool Falcon::StreamBuffer::resizeBuffer | ( | uint32 | size | ) |
Reimplemented from Falcon::Stream.
virtual t_status Falcon::StreamBuffer::status | ( | ) | const [inline, virtual] |
Reimplemented from Falcon::Stream.
virtual int64 Falcon::StreamBuffer::tell | ( | ) | [virtual] |
Reimplemented from Falcon::Stream.
virtual bool Falcon::StreamBuffer::truncate | ( | int64 | pos = -1 |
) | [virtual] |
Reimplemented from Falcon::Stream.
Stream* Falcon::StreamBuffer::underlying | ( | ) | const [inline] |
Returns the underlying stream used by this transcoder.
virtual int32 Falcon::StreamBuffer::writeAvailable | ( | int32 | msecs_timeout, | |
const Sys::SystemData * | sysData | |||
) | [virtual] |
Determines if the stream can be written, possibly with a given timeout.
If sysData is not zero, it will be used to honor concurrent interrupt requests.
Reimplemented from Falcon::Stream.
enum { ... } Falcon::StreamBuffer::enum_default_buffer_size |