libSBML Python API
5.18.0
|
Wrapper class for the C++ standard file stream ofstream
.
The C++ ostringstream
('output string stream') provides an interface for writing data to strings as output streams. This Python class, ostringstream
, wraps the C++ ostringstream
and provides an interface to it.
This class may be useful because some libSBML methods accept an argument for indicating where to send text string output. An example is the SBMLDocument::printErrors() method. The methods use C++ style streams and not Python stream objects. The ostringstream
object exists to bridge the Python and underlying native implementation. It is a simple wrapper around the underlying stream object.
Public Member Functions | |
def | __init__ (self) |
Method variant with the following signature: More... | |
def | str (self, args) |
This method has multiple variants; they differ in the arguments they accept. More... | |
def libsbml.ostringstream.__init__ | ( | self | ) |
Method variant with the following signature:
__init__() string
Constructor for ostringstream objects.
def libsbml.ostringstream.str | ( | self, | |
args | |||
) |
This method has multiple variants; they differ in the arguments they accept.
Each variant is described separately below.
str() string
Returns the copy of the string object currently associated with this ostringstream
buffer.
str(string s)
Sets string s
to the string object currently assosiated with this stream buffer.
s | the string to write to this stream. |