Forums

F.A.Q. F.A.Q.    Register Register    Login Login    Home Home
Search Search
SBML Discussions » sbml-interoperability » New SBMLWriter and MathMLWriter classes
Show: Today's Posts  :: Message Navigator
| Subscribe to topic 
Return to the default flat view Create a new topic Submit Reply
AuthorTopic
Ben Bornstein


Posts: 287
Registered:
September 2003
New SBMLWriter and MathMLWriter classes 16 Apr '05 16:03

Hi All,

While revisiting the writeSBML APIs to fix a bug in the various
language bindings, I promoted the SBMLWriter and (for symmetry) the
MathMLWriter to full-fledged classes. This is something I've been
meaning to do for a long time. In the past a number of people were
confused (and rightly so) by the presence of an SBMLReader, but no
SBMLWriter.

Also, I folded-in some changes that Stefan Hoops had made awhile back,
so (thanks to him) it is now possible to:

1. To use these classes to write to a C++ std::ostream, and

2. Set a program and version name when writing SBMLDocuments,
which will write the following XML comment (intended for
human consumption) at the beginning of the file:

<!--
Created by <program name> version <program version>
on yyyy-MM-dd HH:mm with libsbml version <libsbml version>.
-->

For those of you who use straight C, all the C APIs still work.

Also, related to this, I removed support for writing various character
encodings. This change has been a long time coming. LibSBML should
support writing only UTF-8 because that is what the SBML standard
requires.

Stefan, I replaced SBMLWriter_writeToStream() with SBMLWriter.write()
and similarly for MathMLWriter_writeToStream(). They were really C++
APIs since they took a reference to std::ostream. I realize you
probably wrote them that way because you didn't have a class to put
them in, but if not, and you need them back for some reason, let me
know.

Sarah, please let me know if you have any problems compiling the
SBMLWriter source under MSVC++. If not, then as a result of the new
sbmlfwd.h, we can remove the static_casts<> in the C API layer. That
is, I think I've managed to completely unify the C and C++ types.

Thanks.

Ben


      

SubjectPosterDate
Read Message   New SBMLWriter and MathMLWriter classes  Ben Bornstein16 Apr '05 16:03
Previous Topic:Java and Python bindings work / use SWIG 1.3.24
Next Topic:Python binding work again
Go to forum:
-=] Back to Top [=-

Powered by FUDforum. (Copyright Advanced Internet Designs Inc.)

Please use our issue tracking system for any questions or suggestions about this website.