Panda3D
|
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...
Public Types | |
enum | openmode |
enum | openmode |
enum | seekdir { beg = 0, cur = 1, end = 2 } |
enum | seekdir { beg = 0, cur = 1, end = 2 } |
Public Member Functions | |
StringStream () | |
StringStream (string source) | |
This version of the constructor preloads the buffer with the indicated data. | |
bool | bad () |
bool | bad () |
clear () | |
clear () | |
clearData () | |
Empties the buffer. | |
bool | eof () |
bool | eof () |
bool | fail () |
bool | fail () |
flush () | |
int | get () |
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. | |
bool | good () |
bool | good () |
put (char c) | |
seekg (long int off, seekdir dir) | |
seekg (unsigned long int pos) | |
seekp (unsigned long int pos) | |
seekp (long int off, seekdir dir) | |
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. | |
unsigned long int | tellg () |
unsigned long int | tellp () |
A bi-directional stream object that reads and writes data to an internal buffer, which can be retrieved and/or set as a string.
enum openmode [inherited] |
enum openmode [inherited] |
enum seekdir [inherited] |
enum seekdir [inherited] |
StringStream | ( | ) |
StringStream | ( | string | source | ) |
This version of the constructor preloads the buffer with the indicated data.
bool bad | ( | ) | [inherited] |
bool bad | ( | ) | [inherited] |
clear | ( | ) | [inherited] |
clear | ( | ) | [inherited] |
clearData | ( | ) |
Empties the buffer.
bool eof | ( | ) | [inherited] |
bool eof | ( | ) | [inherited] |
bool fail | ( | ) | [inherited] |
bool fail | ( | ) | [inherited] |
flush | ( | ) | [inherited] |
Reimplemented from ostream.
Reimplemented in SocketStream.
int get | ( | ) | [inherited] |
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.
bool good | ( | ) | [inherited] |
bool good | ( | ) | [inherited] |
put | ( | char | c | ) | [inherited] |
seekg | ( | unsigned long int | pos | ) | [inherited] |
seekp | ( | unsigned long int | pos | ) | [inherited] |
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.
unsigned long int tellg | ( | ) | [inherited] |
unsigned long int tellp | ( | ) | [inherited] |