Loading...
Searching...
No Matches
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

| __init__ (self)
| str (self, *args)

## Constructor & Destructor Documentation

## __init__()

libsbml.ostringstream.__init__ | ( |  | self | ) |

Method variant with the following signature:

    __init__()    string

Constructor for ostringstream objects.

## Member Function Documentation

## str()

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

  s | the string to write to this stream.