libSBML C++ API  5.18.0
MultiExtension.h File Reference

: Implementation of the MultiExtension class More...

Include dependency graph for MultiExtension.h:
This graph shows which files directly or indirectly include this file:

Classes

class  MultiExtension
 multi Base extension class for the package. More...
 

Macros

#define MULTI_CREATE_NS(variable, sbmlns)   EXTENSION_CREATE_NS(MultiPkgNamespaces, variable, sbmlns);
 

Typedefs

typedef SBMLExtensionNamespaces< MultiExtensionMultiPkgNamespaces
 

Enumerations

enum  SBMLMultiTypeCode_t {
  SBML_MULTI_POSSIBLE_SPECIES_FEATURE_VALUE = 1400,
  SBML_MULTI_SPECIES_FEATURE_VALUE = 1401,
  SBML_MULTI_COMPARTMENT_REFERENCE = 1402,
  SBML_MULTI_SPECIES_TYPE_INSTANCE = 1403,
  SBML_MULTI_IN_SPECIES_TYPE_BOND = 1404,
  SBML_MULTI_OUTWARD_BINDING_SITE = 1405,
  SBML_MULTI_SPECIES_FEATURE_TYPE = 1406,
  SBML_MULTI_SPECIES_TYPE_COMPONENT_INDEX = 1407,
  SBML_MULTI_SPECIES_FEATURE = 1408,
  SBML_MULTI_SPECIES_TYPE_COMPONENT_MAP_IN_PRODUCT = 1409,
  SBML_MULTI_SPECIES_TYPE = 1410,
  SBML_MULTI_BINDING_SITE_SPECIES_TYPE = 1411,
  SBML_MULTI_INTRA_SPECIES_REACTION = 1412,
  SBML_MULTI_SUBLIST_OF_SPECIES_FEATURES = 1413
}
 SBMLMultiTypeCode_t Enumeration of possible types in the libSBML “multi” package implementation. More...
 

Detailed Description

: Implementation of the MultiExtension class

Author
: SBMLTeam

Macro Definition Documentation

#define MULTI_CREATE_NS (   variable,
  sbmlns 
)    EXTENSION_CREATE_NS(MultiPkgNamespaces, variable, sbmlns);

Typedef Documentation

Enumeration Type Documentation

SBMLMultiTypeCode_t Enumeration of possible types in the libSBML “multi” package implementation.

LibSBML attaches an identifying code to every kind of SBML object. These are integer constants known as SBML type codes. The names of all the codes begin with the characters 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.

Here follow some additional general information about libSBML type codes:
  • The codes are the possible return values (integers) for the following functions: (Compatibility note: in libSBML 5, the type of return values of these functions changed from an enumeration to an integer for extensibility in the face of different programming languages.)
  • Each package extension must define similar sets of values for each SBase subclass (e.g. SBMLLayoutTypeCode_t for the SBML Level 3 Layout extension, SBMLFbcTypeCode_t for the SBML Level 3 Flux Balance Constraints extension, etc.).
  • The value of each package-specific type code can be duplicated between those of different packages. (This is necessary because the development of libSBML extensions for different SBML packages may be undertaken by different developers at different times; requiring the developers to coordinate their use of type codes would be nettlesome and probably doomed to failure.)
  • To distinguish between the type codes of different packages, both the return value of SBase::getTypeCode() and SBase::getPackageName() must be checked. This is particularly important for functions that take an SBML type code as an argument, such as SBase::getAncestorOfType(), which by default assumes you are handing it a core type, and will return 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():

void example (const SBase *sb)
{
cons std::string pkgName = sb->getPackageName();
if (pkgName == "core")
{
switch (sb->getTypeCode())
{
case SBML_MODEL:
....
break;
....
}
}
else if (pkgName == "layout")
{
switch (sb->getTypeCode())
{
....
break;
....
}
}
...
}
Enumerator
SBML_MULTI_POSSIBLE_SPECIES_FEATURE_VALUE 

PossibleSpeciesFeatureValue

SBML_MULTI_SPECIES_FEATURE_VALUE 

SpeciesFeatureValue

SBML_MULTI_COMPARTMENT_REFERENCE 

CompartmentReference

SBML_MULTI_SPECIES_TYPE_INSTANCE 

SpeciesTypeInstance

SBML_MULTI_IN_SPECIES_TYPE_BOND 

InSpeciesTypeBond

SBML_MULTI_OUTWARD_BINDING_SITE 

OutwardBindingSite

SBML_MULTI_SPECIES_FEATURE_TYPE 

SpeciesFeatureType

SBML_MULTI_SPECIES_TYPE_COMPONENT_INDEX 

SpeciesTypeComponentIndex

SBML_MULTI_SPECIES_FEATURE 

SpeciesFeature

SBML_MULTI_SPECIES_TYPE_COMPONENT_MAP_IN_PRODUCT 

SpeciesTypeComponentMapInProduct

SBML_MULTI_SPECIES_TYPE 

MultiSpeciesType

SBML_MULTI_BINDING_SITE_SPECIES_TYPE 

BindingSiteSpeciesType

SBML_MULTI_INTRA_SPECIES_REACTION 

IntraSpeciesReaction

SBML_MULTI_SUBLIST_OF_SPECIES_FEATURES 

SubListOfSpeciesFeatures