libSBML C API  5.18.0
ModelDefinition_t Class Reference

Detailed Description

comp A model used in model composition.

The Hierarchical Model_t Composition (“comp”) package allows multiple Model_t objects to be defined in a single SBMLDocument_t. While these new Model_t objects are not new SBML classes, they are given a new name, <modelDefinition>, and reside in ListOfModelDefinition objects. In libSBML, this class inherits from the Model_t class, changing only the expected parent of the object, and the XML name.

An additional restriction is placed on the "id" attribute of ModelDefinition_t objects: not only must it be unique across all such attributes of type SId within the ModelDefintion, it must also be unique across all Model_t, ModelDefinition_t, and ExternalModelDefinition_t objects in the same SBMLDocument_t.

Examples:
spec_example1.c.

Public Member Functions

ModelDefinition_tModelDefinition_clone (ModelDefinition_t *md)
 Returns a copy of the given ModelDefinition_t structure. More...
 
ModelDefinition_tModelDefinition_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new ModelDefinition_t structure using the given SBML level and version, and the pkgVersion package version. More...
 
void ModelDefinition_free (ModelDefinition_t *md)
 Frees the given ModelDefinition_t structure. More...
 

Member Function Documentation

ModelDefinition_t * ModelDefinition_clone ( ModelDefinition_t md)

Returns a copy of the given ModelDefinition_t structure.

Parameters
mdthe ModelDefinition_t structure to copy.
Returns
a (deep) copy of the ModelDefinition_t.
ModelDefinition_t * ModelDefinition_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new ModelDefinition_t structure using the given SBML level and version, and the pkgVersion package version.

Parameters
levelan unsigned int, the SBML Level to assign to this ModelDefinition_t.
versionan unsigned int, the SBML Version to assign to this ModelDefinition_t.
pkgVersionan unsigned int, the SBML 'comp' package Version to assign to this ModelDefinition_t.
Returns
a pointer to the newly created ModelDefinition_t structure.
void ModelDefinition_free ( ModelDefinition_t md)

Frees the given ModelDefinition_t structure.

Parameters
mdthe ModelDefinition_t structure to free.