libSBML C API
libSBML 5.20.2 C API
|
Writes an SBML Document to file or in-memory string. More...
Functions | |
SBMLWriter_t * | SBMLWriter_create (void) |
_tCreates_t _ta_t _tnew_t _tSBMLWriter_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t. | |
void | SBMLWriter_free (SBMLWriter_t *sw) |
_tFrees_t _tthe_t _tgiven_t _tSBMLWriter_t. | |
int | SBMLWriter_hasBzip2 () |
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _ton_t _twhether_t _tlibSBML_t _tis_t _tlinked_t _twith_t _tbzip2_t _tat_t _tcompile_t _ttime_t. | |
int | SBMLWriter_hasZlib () |
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _ton_t _twhether_t _tlibSBML_t _tis_t _tlinked_t _twith_t _tzlib_t _tat_t _tcompile_t _ttime_t. | |
int | SBMLWriter_setProgramName (SBMLWriter_t *sw, const char *name) |
_tSets_t _tthe_t _tname_t _tof_t _tthis_t _tprogram_t. | |
int | SBMLWriter_setProgramVersion (SBMLWriter_t *sw, const char *version) |
_tSets_t _tthe_t _tversion_t _tof_t _tthis_t _tprogram_t. | |
int | SBMLWriter_writeSBML (SBMLWriter_t *sw, const SBMLDocument_t *d, const char *filename) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t _tto_t _tfilename_t. | |
int | SBMLWriter_writeSBMLToFile (SBMLWriter_t *sw, const SBMLDocument_t *d, const char *filename) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t _tto_t _tfilename_t. | |
char * | SBMLWriter_writeSBMLToString (SBMLWriter_t *sw, const SBMLDocument_t *d) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t _tto_t _tan_t _tin_t-_tmemory_t _tstring_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t. | |
int | writeSBML (const SBMLDocument_t *d, const char *filename) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t @_tp_t _td_t _tto_t _tthe_t _tfile_t _tnamed_t _tby_t @_tp_t _tfilename_t. | |
int | writeSBMLToFile (const SBMLDocument_t *d, const char *filename) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t @_tp_t _td_t _tto_t _tthe_t _tfile_t @_tp_t _tfilename_t. | |
char * | writeSBMLToString (const SBMLDocument_t *d) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t @_tp_t _td_t _tto_t _tan_t _tin_t-_tmemory_t _tstring_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t. | |
Writes an SBML Document to file or in-memory string.
SBMLWriter_t * SBMLWriter_create | ( | void | ) |
_tCreates_t _ta_t _tnew_t _tSBMLWriter_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t.
@_tmemberof_t _tSBMLWriter_t_t
_tCreates_t _ta_t _tnew_t _tSBMLWriter_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t.
@_tcond_t _tdoxygenIgnored_t
void SBMLWriter_free | ( | SBMLWriter_t * | sw | ) |
_tFrees_t _tthe_t _tgiven_t _tSBMLWriter_t.
@_tmemberof_t _tSBMLWriter_t_t
int SBMLWriter_hasBzip2 | ( | ) |
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _ton_t _twhether_t _tlibSBML_t _tis_t _tlinked_t _twith_t _tbzip2_t _tat_t _tcompile_t _ttime_t.
@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tbzip2_t _tis_t _tlinked_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
@_tmemberof_t _tSBMLWriter_t_t
int SBMLWriter_hasZlib | ( | ) |
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _ton_t _twhether_t _tlibSBML_t _tis_t _tlinked_t _twith_t _tzlib_t _tat_t _tcompile_t _ttime_t.
@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tzlib_t _tis_t _tlinked_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
@_tmemberof_t _tSBMLWriter_t_t
int SBMLWriter_setProgramName | ( | SBMLWriter_t * | sw, |
const char * | name | ||
) |
_tSets_t _tthe_t _tname_t _tof_t _tthis_t _tprogram_t.
_ti_t. _te_t. _tthe_t _tone_t _tabout_t _tto_t _twrite_t _tout_t _tthe_t _tSBMLDocument_t. _tIf_t _tthe_t _tprogram_t _tname_t _tand_t _tversion_t _tare_t _tset_t (_tSBMLWriter_setProgramVersion_t()), _tthe_t _tfollowing_t _tXML_t _tcomment_t, _tintended_t _tfor_t _thuman_t _tconsumption_t, _twill_t _tbe_t _twritten_t _tat_t _tthe_t _tbeginning_t _tof_t _tthe_t _tdocument_t:
@_tverbatim_t
@_tendverbatim_t
@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_OBJECT_t, _tOperationReturnValues_t_t}
@_tmemberof_t _tSBMLWriter_t_t
int SBMLWriter_setProgramVersion | ( | SBMLWriter_t * | sw, |
const char * | version | ||
) |
_tSets_t _tthe_t _tversion_t _tof_t _tthis_t _tprogram_t.
_ti_t. _te_t. _tthe_t _tone_t _tabout_t _tto_t _twrite_t _tout_t _tthe_t _tSBMLDocument_t. _tIf_t _tthe_t _tprogram_t _tversion_t _tand_t _tname_t _tare_t _tset_t (_tSBMLWriter_setProgramName_t()), _tthe_t _tfollowing_t _tXML_t _tcomment_t, _tintended_t _tfor_t _thuman_t _tconsumption_t, _twill_t _tbe_t _twritten_t _tat_t _tthe_t _tbeginning_t _tof_t _tthe_t _tdocument_t:
@_tverbatim_t
@_tendverbatim_t
@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_OBJECT_t, _tOperationReturnValues_t_t}
@_tmemberof_t _tSBMLWriter_t_t
int SBMLWriter_writeSBML | ( | SBMLWriter_t * | sw, |
const SBMLDocument_t * | d, | ||
const char * | filename | ||
) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t _tto_t _tfilename_t.
@_thtmlinclude_t _tassuming_t-_tcompressed_t-_tfile._thtml_t
_tIf_t _tthe_t _tfilename_t _tends_t _twith_t @_tem_t ._tgz_t, _tthe_t _tfile_t _twill_t _tbe_t _tcompressed_t _tby_t @_tem_t _tgzip_t. _tSimilary_t, _tif_t _tthe_t _tfilename_t _tends_t _twith_t @_tem_t ._tzip_t _tor_t @_tem_t ._tbz2_t, _tthe_t _tfile_t _twill_t _tbe_t _tcompressed_t _tby_t @_tem_t _tzip_t _tor_t @_tem_t _tbzip2_t, _trespectively_t. _tOtherwise_t, _tthe_t _tfill_t _twill_t _tbe_t _tuncompressed_t. _tIf_t _tthe_t _tfilename_t _tends_t _twith_t @_tem_t ._tzip_t, _ta_t _tfilename_t _tthat_t _twill_t _tbe_t _tadded_t _tto_t _tthe_t _tzip_t _tarchive_t _tfile_t _twill_t _tend_t _twith_t @_tem_t ._txml_t _tor_t @_tem_t ._tsbml_t. _tFor_t _texample_t, _tthe_t _tfilename_t _tin_t _tthe_t _tzip_t _tarchive_t _twill_t _tbe_t @_tem_t _ttest_t._txml_t _tif_t _tthe_t _tgiven_t _tfilename_t _tis_t @_tem_t _ttest_t._txml_t._tzip_t _tor_t @_tem_t _ttest_t._tzip_t. _tAlso_t, _tthe_t _tfilename_t _tin_t _tthe_t _tarchive_t _twill_t _tbe_t @_tem_t _ttest_t._tsbml_t _tif_t _tthe_t _tgiven_t _tfilename_t _tis_t @_tem_t _ttest_t._tsbml_t._tzip_t.
@_tnote_t _tTo_t _twrite_t _ta_t _tgzip_t/_tzip_t _tfile_t, _tlibSBML_t _tneeds_t _tto_t _tbe_t _tconfigured_t _tand_t _tlinked_t _twith_t _tthe_t <_ta_t _ttarget_t="_blank_t" _thref_t="_thttp_t://_twww_t._tzlib_t._tnet_t/">_tzlib_t</_ta_t> _tlibrary_t _tat_t _tcompile_t _ttime_t. _tIt_t _talso_t _tneeds_t _tto_t _tbe_t _tlinked_t _twith_t _tthe_t <_ta_t _ttarget_t="_blank_t" _thref_t="">_tbzip2_t</_ta_t> _tlibrary_t _tto_t _twrite_t _tfiles_t _tin_t @_tem_t _tbzip2_t _tformat_t. (_tBoth_t _tof_t _tthese_t _tare_t _tthe_t _tdefault_t _tconfigurations_t _tfor_t _tlibSBML_t.) _tErrors_t _tabout_t _tunreadable_t _tfiles_t _twill_t _tbe_t _tlogged_t _tand_t _tthis_t _tmethod_t _twill_t _treturn_t @_tc_t _t0_t (_tfalse_t) _tif_t _ta_t _tcompressed_t _tfilename_t _tis_t _tgiven_t _tand_t _tlibSBML_t _twas_t @_tem_t _tnot_t _tlinked_t _twith_t _tthe_t _tcorresponding_t _trequired_t _tlibrary_t.
@_tnote_t _tSBMLWriter_hasZlib_t() _tand_t _tSBMLWriter_hasBzip2_t() _tcan_t _tbe_t _tused_t _tto_t _tcheck_t _twhether_t _tlibSBML_t _thas_t _tbeen_t _tlinked_t _twith_t _teach_t _tlibrary_t.
@_treturn_t @_tc_t _t1_t (_ttrue_t) _ton_t _tsuccess_t _tand_t @_tc_t _t0_t (_tfalse_t) _tif_t _tthe_t _tfilename_t _tcould_t _tnot_t _tbe_t _topened_t _tfor_t _twriting_t.
@_tmemberof_t _tSBMLWriter_t_t
int SBMLWriter_writeSBMLToFile | ( | SBMLWriter_t * | sw, |
const SBMLDocument_t * | d, | ||
const char * | filename | ||
) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t _tto_t _tfilename_t.
_tIf_t _tthe_t _tfilename_t _tends_t _twith_t @_tem_t ._tgz_t, _tthe_t _tfile_t _twill_t _tbe_t _tcompressed_t _tby_t @_tem_t _tgzip_t. _tSimilary_t, _tif_t _tthe_t _tfilename_t _tends_t _twith_t @_tem_t ._tzip_t _tor_t @_tem_t ._tbz2_t, _tthe_t _tfile_t _twill_t _tbe_t _tcompressed_t _tby_t @_tem_t _tzip_t _tor_t @_tem_t _tbzip2_t, _trespectively_t. _tOtherwise_t, _tthe_t _tfill_t _twill_t _tbe_t _tuncompressed_t. _tIf_t _tthe_t _tfilename_t _tends_t _twith_t @_tem_t ._tzip_t, _ta_t _tfilename_t _tthat_t _twill_t _tbe_t _tadded_t _tto_t _tthe_t _tzip_t _tarchive_t _tfile_t _twill_t _tend_t _twith_t @_tem_t ._txml_t _tor_t @_tem_t ._tsbml_t. _tFor_t _texample_t, _tthe_t _tfilename_t _tin_t _tthe_t _tzip_t _tarchive_t _twill_t _tbe_t @_tem_t _ttest_t._txml_t _tif_t _tthe_t _tgiven_t _tfilename_t _tis_t @_tem_t _ttest_t._txml_t._tzip_t _tor_t @_tem_t _ttest_t._tzip_t. _tAlso_t, _tthe_t _tfilename_t _tin_t _tthe_t _tarchive_t _twill_t _tbe_t @_tem_t _ttest_t._tsbml_t _tif_t _tthe_t _tgiven_t _tfilename_t _tis_t @_tem_t _ttest_t._tsbml_t._tzip_t.
@_tnote_t _tTo_t _tcreate_t _ta_t _tgzip_t/_tzip_t _tfile_t, _tlibSBML_t _tneeds_t _tto_t _tbe_t _tlinked_t _twith_t _tzlib_t _tat_t _tcompile_t _ttime_t. _tAlso_t, _tlibSBML_t _tneeds_t _tto_t _tbe_t _tlinked_t _twith_t _tbzip2_t _tto_t _tcreate_t _ta_t _tbzip2_t _tfile_t. _tFile_t _tunwritable_t _terror_t _twill_t _tbe_t _tlogged_t _tand_t @_tc_t _t0_t (_tfalse_t) _twill_t _tbe_t _treturned_t _tif_t _ta_t _tcompressed_t _tfile_t _tname_t _tis_t _tgiven_t _tand_t _tlibSBML_t _tis_t _tnot_t _tlinked_t _twith_t _tthe_t _trequired_t _tlibrary_t. _tSBMLWriter_hasZlib_t() _tand_t _tSBMLWriter_hasBzip2_t() _tcan_t _tbe_t _tused_t _tto_t _tcheck_t _twhether_t _tlibSBML_t _twas_t _tlinked_t _twith_t _tthe_t _tlibrary_t _tat_t _tcompile_t _ttime_t.
@_treturn_t @_tc_t _t1_t (_ttrue_t) _ton_t _tsuccess_t _tand_t @_tc_t _t0_t (_tfalse_t) _tif_t _tthe_t _tfilename_t _tcould_t _tnot_t _tbe_t _topened_t _tfor_t _twriting_t.
@_tmemberof_t _tSBMLWriter_t_t
char * SBMLWriter_writeSBMLToString | ( | SBMLWriter_t * | sw, |
const SBMLDocument_t * | d | ||
) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t _tto_t _tan_t _tin_t-_tmemory_t _tstring_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t.
_tThe_t _tstring_t _tis_t _towned_t _tby_t _tthe_t _tcaller_t _tand_t _tshould_t _tbe_t _tfreed_t (_twith_t _tfree_t()) _twhen_t _tno_t _tlonger_t _tneeded_t.
@_treturn_t _tthe_t _tstring_t _ton_t _tsuccess_t _tand_t @_tc_t _tNULL_t _tif_t _tone_t _tof_t _tthe_t _tunderlying_t _tparser_t _tcomponents_t _tfail_t (_trare_t).
@_tmemberof_t _tSBMLWriter_t_t
int writeSBML | ( | const SBMLDocument_t * | d, |
const char * | filename | ||
) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t @_tp_t _td_t _tto_t _tthe_t _tfile_t _tnamed_t _tby_t @_tp_t _tfilename_t.
_tThis_t _tconvenience_t _tfunction_t _tis_t _tfunctionally_t _tequivalent_t _tto_t:
_tSBMLWriter_writeSBML_t(_tSBMLWriter_create_t(), _td_t, _tfilename_t);
@_thtmlinclude_t _tassuming_t-_tcompressed_t-_tfile._thtml_t
@_tparam_t _td_t _tthe_t _tSBMLDocument_t _tobject_t _tto_t _tbe_t _twritten_t _tout_t _tin_t _tXML_t _tformat_t.
@_tparam_t _tfilename_t _ta_t _tstring_t _tgiving_t _tthe_t _tpath_t _tto_t _ta_t _tfile_t _twhere_t _tthe_t _tXML_t _tcontent_t _tis_t _tto_t _tbe_t _twritten_t.
@_treturn_t @_tc_t _t1_t (_ttrue_t) _ton_t _tsuccess_t _tand_t @_tc_t _t0_t (_tfalse_t) _tif_t @_tp_t _tfilename_t _tcould_t _tnot_t _tbe_t _twritten_t. _tSome_t _tpossible_t _treasons_t _tfor_t _tfailure_t _tinclude_t (_ta_t) _tbeing_t _tunable_t _tto_t _topen_t _tthe_t _tfile_t, _tand_t (_tb_t) _tusing_t _ta_t _tfilename_t _tthat_t _tindicates_t _ta_t _tcompressed_t _tSBML_t _tfile_t (_ti_t._te_t., _ta_t _tfilename_t _tending_t _tin_t <_tcode_t>&_tquot_t;._tzip_t&_tquot_t;</_tcode_t> _tor_t _tsimilar_t) _twhen_t _tthe_t _tcompression_t _tfunctionality_t _thas_t _tnot_t _tbeen_t _tenabled_t _tin_t _tthe_t _tunderlying_t _tcopy_t _tof_t _tlibSBML_t.
@_tsee_t @_tif_t _tconly_t _tSBMLWriter_hasZlib_t() @_telse_t _tSBMLWriter_t::_thasZlib_t() @_tendif_t @_tsee_t @_tif_t _tconly_t _tSBMLWriter_hasBzip2_t() @_telse_t _tSBMLWriter_t::_thasBzip2_t() @_tendif_t
@_tif_t _tconly_t @_tmemberof_t _tSBMLWriter_t_t @_tendif_t
int writeSBMLToFile | ( | const SBMLDocument_t * | d, |
const char * | filename | ||
) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t @_tp_t _td_t _tto_t _tthe_t _tfile_t @_tp_t _tfilename_t.
_tThis_t _tconvenience_t _tfunction_t _tis_t _tfunctionally_t _tequivalent_t _tto_t:
_tSBMLWriter_writeSBMLToFile_t(_tSBMLWriter_create_t(), _td_t, _tfilename_t);
_tbut_t _tthat_t _tdoes_t _tnot_t _trequire_t _tthe_t _tcaller_t _tto_t _tcreate_t _tan_t _tSBMLWriter_t _tobject_t _tfirst_t.
@_thtmlinclude_t _tassuming_t-_tcompressed_t-_tfile._thtml_t
@_tparam_t _td_t _tan_t _tSBMLDocument_t _tobject_t _tto_t _tbe_t _twritten_t _tout_t _tin_t _tXML_t _tformat_t.
@_tparam_t _tfilename_t _ta_t _tstring_t _tgiving_t _tthe_t _tpath_t _tto_t _ta_t _tfile_t _twhere_t _tthe_t _tXML_t _tcontent_t _tis_t _tto_t _tbe_t _twritten_t.
@_treturn_t @_tc_t _t1_t (_ttrue_t) _ton_t _tsuccess_t _tand_t @_tc_t _t0_t (_tfalse_t) _tif_t @_tp_t _tfilename_t _tcould_t _tnot_t _tbe_t _twritten_t. _tSome_t _tpossible_t _treasons_t _tfor_t _tfailure_t _tinclude_t (_ta_t) _tbeing_t _tunable_t _tto_t _topen_t _tthe_t _tfile_t, _tand_t (_tb_t) _tusing_t _ta_t _tfilename_t _tthat_t _tindicates_t _ta_t _tcompressed_t _tSBML_t _tfile_t (_ti_t._te_t., _ta_t _tfilename_t _tending_t _tin_t <_tcode_t>&_tquot_t;._tzip_t&_tquot_t;</_tcode_t> _tor_t _tsimilar_t) _twhen_t _tthe_t _tcompression_t _tfunctionality_t _thas_t _tnot_t _tbeen_t _tenabled_t _tin_t _tthe_t _tunderlying_t _tcopy_t _tof_t _tlibSBML_t.
@_tif_t _tclike_t @_twarning_t _tNote_t _tthat_t _tthe_t _tstring_t _tis_t _towned_t _tby_t _tthe_t _tcaller_t _tand_t _tshould_t _tbe_t _tfreed_t (_twith_t _tthe_t _tnormal_t _tstring_t <_tcode_t>_tfree_t()</_tcode_t> _tC_t++ _tfunction_t) _tafter_t _tit_t _tis_t _tno_t _tlonger_t _tneeded_t.@_tendif_t
@_tsee_t _tSBMLWriter_t::_thasZlib_t() @_tsee_t _tSBMLWriter_t::_thasBzip2_t()
@_tif_t _tconly_t @_tmemberof_t _tSBMLWriter_t_t @_tendif_t
char * writeSBMLToString | ( | const SBMLDocument_t * | d | ) |
_tWrites_t _tthe_t _tgiven_t _tSBML_t _tdocument_t @_tp_t _td_t _tto_t _tan_t _tin_t-_tmemory_t _tstring_t _tand_t _treturns_t _ta_t _tpointer_t _tto_t _tit_t.
_tThe_t _tstring_t _tis_t _towned_t _tby_t _tthe_t _tcaller_t _tand_t _tshould_t _tbe_t _tfreed_t (_twith_t _tfree_t()) _twhen_t _tno_t _tlonger_t _tneeded_t. _tThis_t _tconvenience_t _tfunction_t _tis_t _tfunctionally_t _tequivalent_t _tto_t:
_tSBMLWriter_writeSBMLToString_t(_tSBMLWriter_create_t(), _td_t);
_tbut_t _tdoes_t _tnot_t _trequire_t _tthe_t _tcaller_t _tto_t _tcreate_t _tan_t _tSBMLWriter_t _tobject_t _tfirst_t.
@_tparam_t _td_t _tan_t _tSBMLDocument_t _tobject_t _tto_t _tbe_t _twritten_t _tout_t _tin_t _tXML_t _tformat_t.
@_treturn_t _tthe_t _tstring_t _ton_t _tsuccess_t _tand_t @_tc_t _tNULL_t _tif_t _tone_t _tof_t _tthe_t _tunderlying_t _tparser_t _tcomponents_t _tfail_t.
@_tif_t _tclike_t @_twarning_t _tNote_t _tthat_t _tthe_t _tstring_t _tis_t _towned_t _tby_t _tthe_t _tcaller_t _tand_t _tshould_t _tbe_t _tfreed_t _tafter_t _tit_t _tis_t _tno_t _tlonger_t _tneeded_t.@_tendif_t
@_tif_t _tconly_t @_tmemberof_t _tSBMLWriter_t_t @_tendif_t