Enumeration to identify SBML objects at runtime.


| enum SBMLTypeCode_t |
An enumeration of SBML types to help identify SBML objects at runtime.
Abstract types do not have a typecode since they cannot be instantiated.
(NOTES)
(In libSBML 5, the type of return values in these functions have been changed from typecode (int) to int for extensibility.)
void example (const SBase *sb) { cons std::string pkgName = sb->getPackageName(); if (pkgName == "core") { switch (sb->getTypeCode()) { case SBML_MODEL: .... break; case SBML_REACTION: .... } } else if (pkgName == "layout") { switch (sb->getTypeCode()) { case SBML_LAYOUT_LAYOUT: .... break; case SBML_LAYOUT_REACTIONGLYPH: .... } } ... }
| 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_.