libsbml.SBMLWriter.writeSBML C# (CSharp) Method

writeSBML() public method

public writeSBML ( SBMLDocument d, OStream stream ) : bool
d SBMLDocument
stream OStream
return bool
        public bool writeSBML(SBMLDocument d, OStream stream)
        {
            bool ret = libsbmlPINVOKE.SBMLWriter_writeSBML__SWIG_1(swigCPtr, SBMLDocument.getCPtr(d), SWIGTYPE_p_std__ostream.getCPtr(stream.get_ostream()));
            if (libsbmlPINVOKE.SWIGPendingException.Pending) throw libsbmlPINVOKE.SWIGPendingException.Retrieve();
            return ret;
        }

Same methods

SBMLWriter::writeSBML ( SBMLDocument d, string filename ) : bool

Usage Example

Example #1
0
 public void test_WriteSBML_error()
 {
     SBMLDocument d = new SBMLDocument();
       SBMLWriter w = new SBMLWriter();
       assertEquals( false, w.writeSBML(d, "/tmp/impossible/path/should/fail") );
       assertTrue( d.getNumErrors() == 1 );
       assertTrue( d.getError(0).getErrorId() == libsbml.XMLFileUnwritable );
       d = null;
       w = null;
 }