#include <rosstream.h>
Public Member Functions | |
virtual FalconData * | clone () const |
Clones the stream. | |
virtual bool | close () |
Close target stream. | |
ROStringStream (const ROStringStream &other) | |
ROStringStream (const char *source, int size=-1) | |
ROStringStream (const String &source) | |
virtual bool | truncate (int64 pos=-1) |
virtual int32 | write (const String &source) |
virtual int32 | write (const void *buffer, int32 size) |
Write to the target stream. | |
virtual int32 | writeAvailable (int32 msecs, const Falcon::Sys::SystemData *) |
Determines if the stream can be written, possibly with a given timeout. | |
virtual | ~ROStringStream () |
The base class StringStream copies strings used as source data.
When the string stream is just bound to read from the string as if it were a file, i.e. with encoders, this is not desirable.
This implementation takes the buffer of the incoming string as stream bytes source, and never alter or destroys the content of the given buffer. The original string must stay available and ummodified for the whole life of the read only string stream, or bad things will happen.
This stringstream can be constructed also with a static char * source, so that it is possible to use statically written code as source of streams.
Falcon::ROStringStream::ROStringStream | ( | const String & | source | ) |
Falcon::ROStringStream::ROStringStream | ( | const char * | source, | |
int | size = -1 | |||
) |
Falcon::ROStringStream::ROStringStream | ( | const ROStringStream & | other | ) |
virtual Falcon::ROStringStream::~ROStringStream | ( | ) | [inline, virtual] |
virtual FalconData* Falcon::ROStringStream::clone | ( | ) | const [virtual] |
Clones the stream.
This version returns 0 and sets error to unsupported; subclasses must properly clone the stream.
Reimplemented from Falcon::StringStream.
virtual bool Falcon::ROStringStream::close | ( | ) | [virtual] |
virtual bool Falcon::ROStringStream::truncate | ( | int64 | pos = -1 |
) | [virtual] |
Reimplemented from Falcon::StringStream.
virtual int32 Falcon::ROStringStream::writeAvailable | ( | int32 | msecs_timeout, | |
const Falcon::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::StringStream.