Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:

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 | ( |  | ) |

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