Panda3D
Public Member Functions | List of all members
StringStreamBuf Class Reference

Used by StringStream to implement an stream that reads from and/or writes to a memory buffer, whose contents can be appended to or extracted at any time by application code. More...

#include "stringStreamBuf.h"

Inheritance diagram for StringStreamBuf:

Public Member Functions

void clear ()
 Empties the buffer. More...
 
const vector_uchar & get_data () const
 Returns a reference to the contents of the internal buffer, without any of the iostream buffer. More...
 
size_t read_chars (char *start, size_t length)
 Attempts to extract the indicated number of characters from the current file position. More...
 
void swap_data (vector_uchar &data)
 Swaps the indicated buffer for the contents of the internal buffer. More...
 
void write_chars (const char *start, size_t length)
 Appends the indicated stream of characters to the current file position. More...
 

Detailed Description

Used by StringStream to implement an stream that reads from and/or writes to a memory buffer, whose contents can be appended to or extracted at any time by application code.

Definition at line 25 of file stringStreamBuf.h.

Member Function Documentation

◆ clear()

void StringStreamBuf::clear ( )

Empties the buffer.

Definition at line 63 of file stringStreamBuf.cxx.

Referenced by StringStream::clear_data().

◆ get_data()

const vector_uchar & StringStreamBuf::get_data ( ) const
inline

Returns a reference to the contents of the internal buffer, without any of the iostream buffer.

Definition at line 28 of file stringStreamBuf.I.

Referenced by StringStream::get_data_size().

◆ read_chars()

size_t StringStreamBuf::read_chars ( char *  start,
size_t  length 
)

Attempts to extract the indicated number of characters from the current file position.

Returns the number of characters extracted.

Definition at line 77 of file stringStreamBuf.cxx.

◆ swap_data()

void StringStreamBuf::swap_data ( vector_uchar &  data)
inline

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

Does not affect the ppos or gpos, or the iostream buffer.

Definition at line 19 of file stringStreamBuf.I.

◆ write_chars()

void StringStreamBuf::write_chars ( const char *  start,
size_t  length 
)

Appends the indicated stream of characters to the current file position.

Definition at line 99 of file stringStreamBuf.cxx.


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