Class StringStream

Inheritance Relationships

Base Type

Class Documentation

class StringStream : public ecl::TextStream<String>

Convenience wrapper for string device based textstreams.

This is a wrapper around what could also be used as a TextStream<String> object. It provides a more convenient handle and direct interfaces to some of the string device functions (otherwise you would normally be required to use TextStream’s device() method).

Public Functions

inline const char *c_str()

Character string representation of the underlying device’s contents.

This returns a null terminates string representing the contents of the underlying device’s internal buffer. Note that this returns the full buffer, not just the unread parts.

Returns:

const char* : pointer to the device’s internal buffer.

inline std::string str()

String representation of the underlying device’s contents.

This generates a c++ style string representing the contents of the underlying device’s internal buffer. Note that this returns the full buffer, not just the unread parts.

Returns:

string : string representation of the underlying device’s internal buffer.

inline void clear()

Clears the underlying device’s internal buffers.

Clears the underlying device’s internal character buffer and resets read/write location pointers.

inline virtual ~StringStream()