libSBML Python API  5.18.0
libsbml.ostringstream Class Reference
Inheritance diagram for libsbml.ostringstream:
[legend]

Detailed Description

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...
 

Constructor & Destructor Documentation

def libsbml.ostringstream.__init__ (   self)

Method variant with the following signature:

__init__()   string

Constructor for ostringstream objects.

Member Function Documentation

def libsbml.ostringstream.str (   self,
  args 
)

This method has multiple variants; they differ in the arguments they accept.

Each variant is described separately below.


Method variant with the following signature:
str()   string

Returns the copy of the string object currently associated with this ostringstream buffer.

Returns
a copy of the string object for this stream.

Method variant with the following signature:
str(string s)

Sets string s to the string object currently assosiated with this stream buffer.

Parameters
sthe string to write to this stream.