Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions
StringStream Class Reference

A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string. More...

Inheritance diagram for StringStream:
iostream istream ostream ios ios ios_base ios_base

List of all members.

Public Member Functions

 StringStream ()
 StringStream (string source)
 This version of the constructor preloads the buffer with the indicated data.
 clearData ()
 Empties the buffer.
string getData ()
 Returns the contents of the data stream as a string.
unsigned int getDataSize ()
 Returns the number of characters available to be read from the data stream.
 setData (string data)
 Replaces the contents of the data stream.
 swapData (vectorunsigned char data)
 Swaps the indicated buffer for the contents of the internal buffer.

Detailed Description

A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string.


Constructor & Destructor Documentation

StringStream ( string  source)

This version of the constructor preloads the buffer with the indicated data.


Member Function Documentation

clearData ( )

Empties the buffer.

string getData ( )

Returns the contents of the data stream as a string.

unsigned int getDataSize ( )

Returns the number of characters available to be read from the data stream.

setData ( string  data)

Replaces the contents of the data stream.

This implicitly reseeks to 0.

swapData ( vectorunsigned char  data)

Swaps the indicated buffer for the contents of the internal buffer.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties