oeosstream

class oeosstream : public oeostream

This class represents oeosstream.

Implements an output stream that writes into an internally contained string.

The following methods are publicly inherited from oeostream:

operator< flush putbyte
close open write

The following methods are publicly inherited from oestream:

operator bool rewind tell
eof seek  
length size  

Constructors

oeosstream()
oeosstream(const char *)
oeosstream(const unsigned char *, oesize_t)

Creates a new oeosstream which is immediately ready to be written to. Passing any of the specified parameters to one of the non-default constructors is equivalent to creating a new oeosstream with the default constructor and then calling the appropriate oeosstream::set method.

If the copy constructor is used, the entire contents of the other stream’s internal string are copied into the newly constructed stream’s internal string.

clear

void clear()

Clears the contents of the internal string.

set

bool set(const char * buffer)
bool set(const unsigned char *, oesize_t len)

Sets the contents of the internal string to the contents of the specified ‘buffer’. If the ‘len’ parameter is not specified, this method will copy the contents of the specified ‘buffer’ until a null character is reached. The null character is not copied. Returns whether or not the contents were successfully copied.

str

std::string str()

Returns a copy of the current internal string.