libSBML C++ API
libSBML 5.17.2 C++ API
|
An example of creating a model using SBML Level 3 Qualitative Models.
#include <iostream>
int main(int argc,char** argv)
{
if (argc != 2)
{
std::cout << "Usage: example1\n";
return 1;
}
= static_cast<QualModelPlugin*>(model->
getPlugin(
"qual"));
qs->setCompartment("c");
qs->setConstant(false);
qs->setInitialLevel(1);
qs->setMaxLevel(4);
qs->setName("sss");
delete document;
return 0;
}
FunctionTerm * createFunctionTerm()
Creates a new FunctionTerm object, adds it to this Transition's ListOfFunctionTerms and returns the F...
Definition: Transition.cpp:787
virtual int setResultLevel(int resultLevel)
Sets the value of the "resultLevel" attribute of this FunctionTerm.
Definition: FunctionTerm.cpp:186
DefaultTerm * createDefaultTerm()
Creates a new DefaultTerm object, adds it to this Transition's ListOfFunctionTerms and returns the De...
Definition: Transition.cpp:814
Input * createInput()
Creates a new Input object, adds it to this Transition's ListOfInputs and returns the Input object cr...
Definition: Transition.cpp:445
int setConstant(bool value)
Sets the value of the "constant" attribute of this Compartment object.
Definition: Compartment.cpp:677
Extension of Model.
Definition: QualModelPlugin.h:60
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this QualitativeSpecies.
Definition: QualitativeSpecies.cpp:272
Include all SBML types in a single header file.
virtual int setQualitativeSpecies(const std::string &qualitativeSpecies)
Sets the value of the "qualitativeSpecies" attribute of this Output.
Definition: Output.cpp:250
The default result of a Transition.
Definition: DefaultTerm.h:65
Output * createOutput()
Creates a new Output object, adds it to this Transition's ListOfOutputs and returns the Output object...
Definition: Transition.cpp:629
Include all SBML types of qual extension in a single header file.
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Compartment object.
Definition: Compartment.cpp:470
A transition of a QualitativeSpecies.
Definition: Transition.h:91
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Transition.
Definition: Transition.cpp:233
virtual int setName(const std::string &name)
Sets the value of the "name" attribute of this Output.
Definition: Output.cpp:287
An SBML compartment, where species are located.
Definition: Compartment.h:480
virtual int setSBOTerm(int value)
Sets the value of the "sboTerm" attribute.
Definition: SBase.cpp:2451
virtual int setMath(const ASTNode *math)
Sets the "math" element of this FunctionTerm.
Definition: FunctionTerm.cpp:198
Abstract Syntax Tree (AST) representation of a mathematical expression.
Definition: ASTNode.h:200
virtual int setResultLevel(int resultLevel)
Sets the value of the "resultLevel" attribute of this DefaultTerm.
Definition: DefaultTerm.cpp:144
Extension of Species.
Definition: QualitativeSpecies.h:86
An SBML model.
Definition: Model.h:475
virtual int setOutputLevel(int outputLevel)
Sets the value of the "outputLevel" attribute of this Output.
Definition: Output.cpp:300
int setPackageRequired(const std::string &package, bool flag)
Sets the required attribute value of the given package extension.
Definition: SBMLDocument.cpp:1431
A function term.
Definition: FunctionTerm.h:75
QualitativeSpecies * createQualitativeSpecies()
Creates a new qual object and adds it to the list of qual objects and returns it.
ASTNode_t * SBML_parseL3Formula(const char *formula)
Parses a text string as a mathematical formula and returns an AST representation of it.
Definition: L3Parser.cpp:3101
Set of SBML Level + Version + namespace triples.
Definition: SBMLNamespaces.h:135
Compartment * createCompartment()
Creates a new Compartment inside this Model and returns it.
Definition: Model.cpp:1555
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Output.
Definition: Output.cpp:240
The output from a QualitativeSpecies.
Definition: Output.h:95
#define LIBSBML_CPP_NAMESPACE_USE
Definition: libsbml-namespace.h:63
Overall SBML container object.
Definition: SBMLDocument.h:338
SBasePlugin * getPlugin(const std::string &package)
Returns a plug-in object (extension interface) for an SBML Level 3 package extension with the given p...
Definition: SBase.cpp:3456
int writeSBML(const SBMLDocument_t *d, const char *filename)
Writes the given SBML document d to the file named by filename.
int setTransitionEffect(const OutputTransitionEffect_t transitionEffect)
Sets the value of the "transitionEffect" attribute of this Output.
Definition: Output.cpp:268
Transition * createTransition()
Creates a new qual object and adds it to the list of qual objects and returns it.
Model * createModel(const std::string &sid="")
Creates a new Model inside this SBMLDocument, and returns a pointer to it.
Definition: SBMLDocument.cpp:635