Prints the rule, reaction, and event formulas in a given SBML document.
Prints the rule, reaction, and event formulas in a given SBML document.
#include <stdio.h>
#include <stdlib.h>
void
{
char *formula;
{
{
{
}
}
printf(") := ");
{
printf("(no body defined)");
}
else
{
printf("%s\n", formula);
free(formula);
}
}
}
void
printRuleMath (
unsigned int n,
const Rule_t *r)
{
char *formula;
{
printf("Rule %d, formula: %s\n", n, formula);
free(formula);
}
}
void
{
char *formula;
{
{
printf("Reaction %d, formula: %s\n", n, formula);
free(formula);
}
}
}
void
{
const char *variable;
char *formula;
{
printf(" EventAssignment %d, trigger: %s = %s\n", n, variable, formula);
free(formula);
}
}
void
printEventMath (
unsigned int n,
Event_t *e)
{
char *formula;
unsigned int i;
{
printf("Event %d delay: %s\n", n, formula);
free(formula);
}
{
printf("Event %d trigger: %s\n", n, formula);
free(formula);
}
{
}
printf("\n");
}
void
{
unsigned int n;
{
}
{
}
printf("\n");
{
}
printf("\n");
{
}
}
int
main (int argc, char *argv[])
{
if (argc != 2)
{
printf("Usage: printMath filename\n");
return 1;
}
printMath(m);
printf("\n");
return 0;
}
unsigned int ASTNode_getNumChildren(const ASTNode_t *node)
_tReturns_t _tthe_t _tnumber_t _tof_t _tchildren_t _tof_t _ta_t _tgiven_t _tnode_t.
Definition ASTNode.cpp:4729
const char * ASTNode_getName(const ASTNode_t *node)
_tReturns_t _tthe_t _tvalue_t _tof_t _ta_t _tnode_t _tas_t _ta_t _tstring_t.
Definition ASTNode.cpp:4779
ASTNode_t * ASTNode_getChild(const ASTNode_t *node, unsigned int n)
_tReturns_t _ta_t _tchild_t _tof_t _ta_t _tnode_t _taccording_t _tto_t _tits_t _tindex_t _tnumber_t.
Definition ASTNode.cpp:4702
ASTNode_t * ASTNode_getLeftChild(const ASTNode_t *node)
_tReturns_t _tthe_t _tleft_t-_tmost_t _tchild_t _tof_t _ta_t _tgiven_t _tnode_t.
Definition ASTNode.cpp:4711
const ASTNode_t * Delay_getMath(const Delay_t *t)
_tGet_t _tthe_t _tmathematical_t _tformula_t _tfor_t _ta_t _tDelay_t_t _tstructure_t _tand_t _treturn...
Definition Delay.cpp:908
int Event_isSetTrigger(const Event_t *e)
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _to...
Definition Event.cpp:2449
Delay_t * Event_getDelay(Event_t *e)
_tTakes_t _tan_t _tEvent_t_t _tstructure_t _tand_t _treturns_t _tits_t _tDelay_t_t _tstructure_t.
Definition Event.cpp:2401
unsigned int Event_getNumEventAssignments(const Event_t *e)
_tReturns_t _tthe_t _tnumber_t _tof_t _tEventAssignment_t_t _tstructures_t _tattached_t _tto_t _tthe_...
Definition Event.cpp:2719
EventAssignment_t * Event_getEventAssignment(Event_t *e, unsigned int n)
_tReturn_t _ta_t _tspecific_t _tEventAssignment_t_t _tstructure_t _tof_t _tthe_t _tgiven_t _tEvent_t_...
Definition Event.cpp:2702
Trigger_t * Event_getTrigger(Event_t *e)
_tTakes_t _tan_t _tEvent_t_t _tstructure_t _tand_t _treturns_t _tits_t _tTrigger_t_t _tstructure_t.
Definition Event.cpp:2393
int Event_isSetDelay(const Event_t *e)
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _to...
Definition Event.cpp:2457
const char * EventAssignment_getVariable(const EventAssignment_t *ea)
_tReturns_t _tthe_t _tvalue_t _tof_t _tthe_t "_tvariable_t" _tattribute_t _tof_t _tthis_t _tEventAssi...
Definition EventAssignment.cpp:1296
const ASTNode_t * EventAssignment_getMath(const EventAssignment_t *ea)
_tReturns_t _tthe_t _tmathematical_t _tformula_t _tstored_t _tin_t _tthe_t _tgiven_t _tEventAssignmen...
Definition EventAssignment.cpp:1304
int EventAssignment_isSetMath(const EventAssignment_t *ea)
_tPredicate_t _tfor_t _ttesting_t _twhether_t _tthe_t _tattribute_t "_tvariable_t" _tof_t _tthe_t _tg...
Definition EventAssignment.cpp:1320
const char * FunctionDefinition_getId(const FunctionDefinition_t *fd)
_tGet_t _tthe_t _tidentifier_t _tof_t _tthe_t _tgiven_t _tFunctionDefinition_t_t _tstructure_t.
Definition FunctionDefinition.cpp:1375
int FunctionDefinition_isSetMath(const FunctionDefinition_t *fd)
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _to...
Definition FunctionDefinition.cpp:1415
const ASTNode_t * FunctionDefinition_getMath(const FunctionDefinition_t *fd)
_tGet_t _tthe_t _tmathematical_t _tformula_t _timplemented_t _tby_t _tthe_t _tgiven_t _tfunction_t.
Definition FunctionDefinition.cpp:1391
const ASTNode_t * KineticLaw_getMath(const KineticLaw_t *kl)
_tReturns_t _tthe_t _tmathematical_t _texpression_t _tof_t _tthis_t _tKineticLaw_t_t _tstructure_t _t...
Definition KineticLaw.cpp:2067
int KineticLaw_isSetMath(const KineticLaw_t *kl)
_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _to...
Definition KineticLaw.cpp:2101
unsigned int Model_getNumEvents(const Model_t *m)
_tGet_t _tthe_t _tnumber_t _tof_t _tEvent_t_t _tstructures_t _tin_t _tthe_t _tgiven_t _tModel_t_t _ts...
Definition Model.cpp:8213
Event_t * Model_getEvent(Model_t *m, unsigned int n)
_tGet_t _tthe_t _tnth_t _tEvent_t_t _tstructure_t _tcontained_t _tin_t _tthe_t _tgiven_t _tModel_t_t ...
Definition Model.cpp:8102
unsigned int Model_getNumReactions(const Model_t *m)
_tGet_t _tthe_t _tnumber_t _tof_t _tReaction_t_t _tstructures_t _tin_t _tthe_t _tgiven_t _tModel_t_t ...
Definition Model.cpp:8205
unsigned int Model_getNumFunctionDefinitions(const Model_t *m)
_tGet_t _tthe_t _tnumber_t _tof_t _tFunctionDefinition_t_t _tstructures_t _tin_t _tthe_t _tgiven_t _t...
Definition Model.cpp:8118
unsigned int Model_getNumRules(const Model_t *m)
_tGet_t _tthe_t _tnumber_t _tof_t _tRule_t_t _tstructures_t _tin_t _tthe_t _tgiven_t _tModel_t_t _tst...
Definition Model.cpp:8190
Reaction_t * Model_getReaction(Model_t *m, unsigned int n)
_tGet_t _tthe_t _tnth_t _tReaction_t_t _tstructure_t _tcontained_t _tin_t _tthe_t _tgiven_t _tModel_t...
Definition Model.cpp:8078
Rule_t * Model_getRule(Model_t *m, unsigned int n)
_tGet_t _tthe_t _tnth_t _tRule_t_t _tstructure_t _tcontained_t _tin_t _tthe_t _tgiven_t _tModel_t_t _...
Definition Model.cpp:8054
FunctionDefinition_t * Model_getFunctionDefinition(Model_t *m, unsigned int n)
_tGet_t _tthe_t _tnth_t _tFunctionDefinition_t_t _tstructure_t _tcontained_t _tin_t _tthe_t _tgiven_t...
Definition Model.cpp:7926
int Reaction_isSetKineticLaw(const Reaction_t *r)
@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tKineticLaw_t_t _tof_t _tthis_t _tReaction_t_t _t...
Definition Reaction.cpp:2754
KineticLaw_t * Reaction_getKineticLaw(Reaction_t *r)
@_treturn_t _tthe_t _tKineticLaw_t_t _tof_t _tthis_t _tReaction_t_t.
Definition Reaction.cpp:2705
const ASTNode_t * Rule_getMath(const Rule_t *r)
@_treturn_t _tthe_t _tmath_t _tfor_t _tthis_t _tRule_t_t.
Definition Rule.cpp:2004
int Rule_isSetMath(const Rule_t *r)
@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tmath_t (_tor_t _tequivalently_t _tthe_t _tformul...
Definition Rule.cpp:2044
void SBMLDocument_printErrors(SBMLDocument_t *d, FILE *stream)
_tPrints_t _tto_t _tthe_t _tgiven_t _toutput_t _tstream_t _tall_t _tthe_t _terrors_t _tor_t _twarning...
Definition SBMLDocument.cpp:2525
void SBMLDocument_free(SBMLDocument_t *d)
_tFrees_t _tthe_t _tgiven_t _tSBMLDocument_t_t _tstructure_t.
Definition SBMLDocument.cpp:2248
Model_t * SBMLDocument_getModel(SBMLDocument_t *d)
_tReturns_t _tthe_t _tModel_t_t _tstructure_t _tstored_t _tin_t _tthis_t _tSBMLDocument_t_t _tstructu...
Definition SBMLDocument.cpp:2290
SBMLDocument_t * readSBML(const char *filename)
@_tcopydoc_t _tdoc_readsbmlfromfile_t
Definition SBMLReader.cpp:446
Include all SBML types in a single header file.
const ASTNode_t * Trigger_getMath(const Trigger_t *t)
@_treturn_t _tthe_t _tmath_t _tof_t _tthis_t _tTrigger_t_t.
Definition Trigger.cpp:1031