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->
setId(
"mitochon");
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.
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
Member * createMember()
Creates a new Member object, adds it to this Group object and returns the Member object created.
Definition: Group.cpp:444
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
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:228
int setIdRef(const std::string &idRef)
Sets the value of the "idRef" attribute of this Member.
Definition: Member.cpp:239
Species * createSpecies()
Creates a new Species inside this Model and returns it.
Definition: Model.cpp:1586
Compartment * createCompartment()
Creates a new Compartment inside this Model and returns it.
Definition: Model.cpp:1558
Definition: SBMLDocument.h:351
int setPackageRequired(const std::string &package, bool flag)
Sets the required attribute value of the given package extension.
Definition: SBMLDocument.cpp:1420
Model * createModel(const std::string sid="")
Creates a new Model inside this SBMLDocument, and returns a pointer to it.
Definition: SBMLDocument.cpp:627
Definition: SBMLNamespaces.h:145
virtual int setSBOTerm(int value)
Sets the value of the "sboTerm" attribute.
Definition: SBase.cpp:2515
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:3530
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