Set of SBML Level + Version + namespace triples.
This class of objects is defined by libSBML only and has no direct
equivalent in terms of SBML components. This class is not prescribed by
the SBML specifications, although it is used to implement features
defined in SBML.
There are differences in the definitions of components between different SBML Levels, as well as Versions within Levels. For example, the "sboTerm" attribute was not introduced until Level 2 Version 2, and then only on certain component classes; the SBML Level 2 Version 3 specification moved the "sboTerm" attribute to the SBase_t class, thereby allowing nearly all components to have SBO_t annotations. As a result of differences such as those, libSBML needs to track the SBML Level and Version of every object created.
The purpose of the SBMLNamespaces_t object class is to make it easier to communicate SBML Level and Version data between libSBML constructors and other methods. The SBMLNamespaces_t object class tracks 3-tuples (triples) consisting of SBML Level, Version, and the corresponding SBML XML namespace.
The plural name (SBMLNamespaces_t) is not a mistake, because in SBML Level 3, objects may have extensions added by Level 3 packages used by a given model and therefore may have multiple namespaces associated with them; however, until the introduction of SBML Level 3, the SBMLNamespaces_t object only records one SBML Level/Version/namespace combination at a time. Most constructors for SBML objects in libSBML take a SBMLNamespaces_t object as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given SBML Level and Version.
- Examples:
- printSupported.c, and spec_example1.c.
SBMLNamespaces_t * SBMLNamespaces_create |
( |
unsigned int |
level, |
|
|
unsigned int |
version |
|
) |
| |
Creates a new SBMLNamespaces_t structure corresponding to the given SBML level
and version
.
SBMLNamespaces_t structures are used in libSBML to communicate SBML Level and Version data between constructors and other methods. The SBMLNamespaces_t structure class tracks 3-tuples (triples) consisting of SBML Level, Version, and the corresponding SBML XML namespace. Most constructors for SBML structures in libSBML take a SBMLNamespaces_t structure as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given SBML Level and Version.
The plural name "SBMLNamespaces_t" is not a mistake, because in SBML Level 3, structures may have extensions added by Level 3 packages used by a given model; however, until the introduction of SBML Level 3, the SBMLNamespaces_t structure only records one SBML Level/Version/namespace combination at a time.
- Parameters
-
level | the SBML level. |
version | the SBML version. |
- Returns
- SBMLNamespaces_t structure created
- Documentation note:
-
The native C++ implementation of this method defines a default argument
value. In the documentation generated for different libSBML language
bindings, you may or may not see corresponding arguments in the method
declarations. For example, in Java and C#, a default argument is handled by
declaring two separate methods, with one of them having the argument and
the other one lacking the argument. However, the libSBML documentation will
be identical for both methods. Consequently, if you are reading
this and do not see an argument even though one is described, please look
for descriptions of other variants of this method near where this one
appears in the documentation.
- Examples:
- spec_example1.c.