Panda3D
Public Member Functions | Public Attributes | List of all members
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 in Python 2 or a bytes object in Python 3. More...

Inheritance diagram for StringStream:
Iostream Istream Ostream BasicIosChar BasicIosChar IosBase IosBase

Public Member Functions

 __init__ ()
 
 __init__ (object source)
 
 clearData ()
 Empties the buffer. More...
 
object getData ()
 Returns the contents of the data stream as a string. More...
 
int getDataSize ()
 Returns the number of characters available to be read from the data stream. More...
 
 setData (object data)
 
- Public Member Functions inherited from Iostream
 flush ()
 
- Public Member Functions inherited from Istream
int get ()
 
 seekg (Streamoff pos)
 
 seekg (Streamoff off, IosBase::Seekdir dir)
 
Streamoff tellg ()
 
- Public Member Functions inherited from BasicIosChar
bool bad ()
 
 clear ()
 
bool eof ()
 
bool fail ()
 
bool good ()
 
- Public Member Functions inherited from Ostream
 flush ()
 
 put (char c)
 
 seekp (Streamoff pos)
 
 seekp (Streamoff off, IosBase::Seekdir dir)
 
Streamoff tellp ()
 

Public Attributes

object data
 Returns the contents of the data stream as a string. More...
 

Additional Inherited Members

- Public Types inherited from IosBase
enum  Iostate
 
enum  Openmode
 
enum  Seekdir { beg = 0, cur = 1, end = 2 }
 

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 in Python 2 or a bytes object in Python 3.

Member Function Documentation

◆ __init__() [1/2]

__init__ ( )

◆ __init__() [2/2]

__init__ ( object  source)

◆ clearData()

clearData ( )

Empties the buffer.

◆ getData()

object getData ( )

Returns the contents of the data stream as a string.

◆ getDataSize()

int getDataSize ( )

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

◆ setData()

setData ( object  data)

Member Data Documentation

◆ data

object data

Returns the contents of the data stream as a string.