HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_StringStream Class Reference

An bi-directional stream object that owns its own string buffer storage. More...

#include <UT_StringStream.h>

+ Inheritance diagram for UT_StringStream:

Public Member Functions

 UT_StringStream (openmode m=in_out)
 
 UT_StringStream (exint reserved_size, openmode m=in_out)
 
 UT_StringStream (const UT_WorkBuffer &buf, openmode m=in_out)
 
 UT_StringStream (const char *buf, exint len=-1, openmode m=in_out)
 
UT_StringStreamBufferrdbuf () const
 Returns the underlying stream buffer object. More...
 
const UT_WorkBufferstr () const
 Returns a read-only reference to the underlying UT_WorkBuffer. More...
 
void reset ()
 Resets the input stream and clears all existing input data. More...
 

Detailed Description

An bi-directional stream object that owns its own string buffer storage.

Definition at line 286 of file UT_StringStream.h.

Constructor & Destructor Documentation

UT_StringStream::UT_StringStream ( openmode  m = in_out)
inlineexplicit

Start with an empty string buffer. Use rdbuf()->swap() to swap in new data if required. Otherwise it will simply eof, on read, right from the start.

Definition at line 292 of file UT_StringStream.h.

UT_StringStream::UT_StringStream ( exint  reserved_size,
openmode  m = in_out 
)
inlineexplicit

Start with an empty string buffer with a given size reservation, if it is known in advance how much data will be written out. The input stream will still be empty.

Definition at line 300 of file UT_StringStream.h.

UT_StringStream::UT_StringStream ( const UT_WorkBuffer buf,
openmode  m = in_out 
)
inlineexplicit

Populate the input stream with an existing UT_WorkBuffer. The contents of the buffer are copied into the internal storage, the output position set to the end of the buffer, and the input position at the beginning of the buffer.

Definition at line 310 of file UT_StringStream.h.

UT_StringStream::UT_StringStream ( const char *  buf,
exint  len = -1,
openmode  m = in_out 
)
inlineexplicit

Populate the input stream with an existing raw character buffer. The contents of the buffer are copied into the internal storage, the output position set to the end of the buffer, and the input position at the beginning of the buffer.

Definition at line 320 of file UT_StringStream.h.

Member Function Documentation

UT_StringStreamBuffer* UT_StringStream::rdbuf ( ) const
inline

Returns the underlying stream buffer object.

Definition at line 327 of file UT_StringStream.h.

void UT_StringStream::reset ( void  )
inline

Resets the input stream and clears all existing input data.

Definition at line 333 of file UT_StringStream.h.

const UT_WorkBuffer& UT_StringStream::str ( ) const
inline

Returns a read-only reference to the underlying UT_WorkBuffer.

Definition at line 330 of file UT_StringStream.h.


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