libSBML C++ API
5.18.0
|
Enumeration to identify SBML objects at runtime. More...
Enumerations | |
enum | SBMLTypeCode_t { SBML_UNKNOWN = 0, SBML_COMPARTMENT = 1, SBML_COMPARTMENT_TYPE = 2, SBML_CONSTRAINT = 3, SBML_DOCUMENT = 4, SBML_EVENT = 5, SBML_EVENT_ASSIGNMENT = 6, SBML_FUNCTION_DEFINITION = 7, SBML_INITIAL_ASSIGNMENT = 8, SBML_KINETIC_LAW = 9, SBML_LIST_OF = 10, SBML_MODEL = 11, SBML_PARAMETER = 12, SBML_REACTION = 13, SBML_RULE = 14, SBML_SPECIES = 15, SBML_SPECIES_REFERENCE = 16, SBML_SPECIES_TYPE = 17, SBML_MODIFIER_SPECIES_REFERENCE = 18, SBML_UNIT_DEFINITION = 19, SBML_UNIT = 20, SBML_ALGEBRAIC_RULE = 21, SBML_ASSIGNMENT_RULE = 22, SBML_RATE_RULE = 23, SBML_SPECIES_CONCENTRATION_RULE = 24, SBML_COMPARTMENT_VOLUME_RULE = 25, SBML_PARAMETER_RULE = 26, SBML_TRIGGER = 27, SBML_DELAY = 28, SBML_STOICHIOMETRY_MATH = 29, SBML_LOCAL_PARAMETER = 30, SBML_PRIORITY = 31, SBML_GENERIC_SBASE = 32 } |
The enumeration of possible SBML core object types. More... | |
Functions | |
const char * | SBMLTypeCode_toString (int tc, const char *pkgName) |
This method takes an SBML type code and returns a string representing the code. More... | |
Enumeration to identify SBML objects at runtime.
enum SBMLTypeCode_t |
The enumeration of possible SBML core object types.
SBML_
. The set of possible type codes for core elements is defined in the enumeration SBMLTypeCode_t, and in addition, libSBML plug-ins for SBML Level 3 packages define their own extra enumerations of type codes (e.g., SBMLLayoutTypeCode_t for the Level 3 Layout package). Note that different Level 3 package plug-ins may use overlapping type codes; to identify the package to which a given object belongs, call the SBase::getPackageName()
method on the object.The exception to this is lists: all SBML-style list elements have the type SBML_LIST_OF, regardless of what package they are from.
SBMLLayoutTypeCode_t
for the SBML Level 3 Layout extension, SBMLFbcTypeCode_t
for the SBML Level 3 Flux Balance Constraints extension, etc.).NULL
if the value you give it is actually from a package.The following example code illustrates the combined use of SBase::getPackageName() and SBase::getTypeCode():
Enumerator | |
---|---|
SBML_UNKNOWN |
An unknown SBase type. The default, but will not be returned for any SBML core object, nor any fully-implemented package object. |
SBML_COMPARTMENT | |
SBML_COMPARTMENT_TYPE |
CompartmentType (Note: L2 only) |
SBML_CONSTRAINT | |
SBML_DOCUMENT | |
SBML_EVENT | |
SBML_EVENT_ASSIGNMENT | |
SBML_FUNCTION_DEFINITION | |
SBML_INITIAL_ASSIGNMENT | |
SBML_KINETIC_LAW | |
SBML_LIST_OF | |
SBML_MODEL | |
SBML_PARAMETER | |
SBML_REACTION | |
SBML_RULE |
Rule (Note: will not be returned from any getType function on any SBML core object, as it is an abstract base class only.) |
SBML_SPECIES | |
SBML_SPECIES_REFERENCE | |
SBML_SPECIES_TYPE |
SpeciesType (Note: L2 only) |
SBML_MODIFIER_SPECIES_REFERENCE | |
SBML_UNIT_DEFINITION | |
SBML_UNIT | |
SBML_ALGEBRAIC_RULE | |
SBML_ASSIGNMENT_RULE | |
SBML_RATE_RULE | |
SBML_SPECIES_CONCENTRATION_RULE |
A Rule of the L1 type SpeciesConcentrationRule |
SBML_COMPARTMENT_VOLUME_RULE |
A Rule of the L1 type CompartmentVolumeRule |
SBML_PARAMETER_RULE |
A Rule of the L1 type ParameterRule |
SBML_TRIGGER | |
SBML_DELAY | |
SBML_STOICHIOMETRY_MATH |
StoichiometryMath (Note: L2 only) |
SBML_LOCAL_PARAMETER | |
SBML_PRIORITY | |
SBML_GENERIC_SBASE |
Any SBase-derived class. Not returned by any getType function, but used internally for packages that extend the SBase class itself, in the PKGNAMEExtension classes (such as CompExtension). |
const char* SBMLTypeCode_toString | ( | int | tc, |
const char * | pkgName | ||
) |
This method takes an SBML type code and returns a string representing the code.
LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. The set of possible type codes is defined in the enumeration SBMLTypeCode_t. The names of the type codes all begin with the characters SBML_
.