Falcon::ROStringStream Class Reference

Read only string stream for fast operations. More...

#include <rosstream.h>

Inheritance diagram for Falcon::ROStringStream:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual FalconDataclone () 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 ()


Detailed Description

Read only string stream for fast operations.

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.


Constructor & Destructor Documentation

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]


Member Function Documentation

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]

Close target stream.

Reimplemented from Falcon::StringStream.

virtual bool Falcon::ROStringStream::truncate ( int64  pos = -1  )  [virtual]

Reimplemented from Falcon::StringStream.

virtual int32 Falcon::ROStringStream::write ( const String source  )  [virtual]

virtual int32 Falcon::ROStringStream::write ( const void *  buffer,
int32  size 
) [virtual]

Write to the target stream.

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.


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

Generated on Mon Oct 19 10:11:41 2009 for Falcon_Core by  doxygen 1.5.8