Simple example of writing a model that uses the SBML Level 3 Groups package.
Simple example of writing a model that uses the SBML Level 3 Groups package.
LIBSBML_CPP_NAMESPACE_USE
int main(int argc,char** argv){
compartment->
setId(
"cytosol");
compartment=model->createCompartment();
compartment->
setId(
"mitochon");
Species* species = model->createSpecies();
species = model->createSpecies();
delete document;
}
@ GROUP_KIND_CLASSIFICATION
Definition: GroupsExtension.h:405
Definition of GroupsExtensionTypes.
Include all SBML types in a single header file.
int writeSBML(const SBMLDocument_t *d, const char *filename)
Writes the given SBML document d to the file named by filename.
@sbmlpackage{core}
Definition: Compartment.h:490
int setConstant(bool value)
Sets the value of the "constant" attribute of this Compartment object.
Definition: Compartment.cpp:661
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Compartment object.
Definition: Compartment.cpp:479
@sbmlpackage{groups}
Definition: Group.h:177
Member * createMember()
Creates a new Member object, adds it to this Group object and returns the Member object created.
Definition: Group.cpp:448
int setKind(const GroupKind_t kind)
Sets the value of the "kind" attribute of this Group.
Definition: Group.cpp:234
virtual int setId(const std::string &id)
Sets the value of the "id" attribute of this Group.
Definition: Group.cpp:213
@sbmlpackage{groups}
Definition: GroupsModelPlugin.h:66
Group * createGroup()
Creates a new Group object, adds it to this GroupsModelPlugin object and returns the Group object cre...
Definition: GroupsModelPlugin.cpp:232
@sbmlpackage{groups}
Definition: Member.h:85
int setIdRef(const std::string &idRef)
Sets the value of the "idRef" attribute of this Member.
Definition: Member.cpp:239
@sbmlpackage{core}
Definition: SBMLDocument.h:349
int setPackageRequired(const std::string &package, bool flag)
Sets the required attribute value of the given package extension.
Definition: SBMLDocument.cpp:1404
Model * createModel(const std::string sid="")
Creates a new Model inside this SBMLDocument, and returns a pointer to it.
Definition: SBMLDocument.cpp:623
@sbmlpackage{core}
Definition: SBMLNamespaces.h:145
virtual int setSBOTerm(int value)
Sets the value of the "sboTerm" attribute.
Definition: SBase.cpp:2398
@sbmlpackage{core}
Definition: Species.h:429
int setCompartment(const std::string &sid)
Sets the "compartment" attribute of this Species object.
Definition: Species.cpp:661
int setConstant(bool value)
Sets the "constant" attribute of this Species object.
Definition: Species.cpp:820
int setBoundaryCondition(bool value)
Sets the "boundaryCondition" attribute of this Species object.
Definition: Species.cpp:787
int setInitialConcentration(double value)
Sets the "initialConcentration" attribute of this Species and marks the field as set.
Definition: Species.cpp:695
virtual int setId(const std::string &sid)
Sets the value of the "id" attribute of this Species.
Definition: Species.cpp:591
int setHasOnlySubstanceUnits(bool value)
Sets the "hasOnlySubstanceUnits" attribute of this Species object.
Definition: Species.cpp:767