libSBML C++ API
libSBML 5.18.0 C++ API
|
Simple example of writing a model that uses the SBML Level 3 Groups package.
int main(int argc,char** argv){
compartment->
setId(
"cytosol");
compartment->
setId(
"mitochon");
group->setSBOTerm("SBO:0000252");
Member* member = group->createMember();
member = group->createMember();
delete document;
}
Definition: GroupsExtension.h:400
int setConstant(bool value)
Sets the value of the "constant" attribute of this Compartment object.
Definition: Compartment.cpp:681
int setInitialConcentration(double value)
Sets the "initialConcentration" attribute of this Species and marks the field as set.
Definition: Species.cpp:699
Include all SBML types in a single header file.
Extension of Model.
Definition: GroupsModelPlugin.h:60
The Member class defines what objects are parts of a Group.
Definition: Member.h:79
Model * createModel(const std::string sid="")
Creates a new Model inside this SBMLDocument, and returns a pointer to it.
Definition: SBMLDocument.cpp:643
Species * createSpecies()
Creates a new Species inside this Model and returns it.
Definition: Model.cpp:1590
Representation of a group of SBML components.
Definition: Group.h:171
Definition of GroupsExtensionTypes.
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Compartment object.
Definition: Compartment.cpp:474
int setConstant(bool value)
Sets the "constant" attribute of this Species object.
Definition: Species.cpp:824
An SBML compartment, where species are located.
Definition: Compartment.h:484
virtual int setId(const std::string &id)
Sets the value of the "id" attribute of this Group.
Definition: Group.cpp:208
An SBML model.
Definition: Model.h:479
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Species.
Definition: Species.cpp:586
Group * createGroup()
Creates a new Group object, adds it to this GroupsModelPlugin object and returns the Group object cre...
Definition: GroupsModelPlugin.cpp:227
int setPackageRequired(const std::string &package, bool flag)
Sets the required attribute value of the given package extension.
Definition: SBMLDocument.cpp:1439
Set of SBML Level + Version + namespace triples.
Definition: SBMLNamespaces.h:139
int setCompartment(const std::string &sid)
Sets the "compartment" attribute of this Species object.
Definition: Species.cpp:665
Compartment * createCompartment()
Creates a new Compartment inside this Model and returns it.
Definition: Model.cpp:1563
int setIdRef(const std::string &idRef)
Sets the value of the "idRef" attribute of this Member.
Definition: Member.cpp:234
An SBML species – a pool of entities.
Definition: Species.h:423
#define LIBSBML_CPP_NAMESPACE_USE
Definition: libsbml-namespace.h:67
Overall SBML container object.
Definition: SBMLDocument.h:342
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:3460
int setBoundaryCondition(bool value)
Sets the "boundaryCondition" attribute of this Species object.
Definition: Species.cpp:791
int setHasOnlySubstanceUnits(bool value)
Sets the "hasOnlySubstanceUnits" attribute of this Species object.
Definition: Species.cpp:771
int writeSBML(const SBMLDocument_t *d, const char *filename)
Writes the given SBML document d to the file named by filename.