libSBML C API  5.18.0
LayoutExtension.h File Reference

Definition of LayoutExtension_t, the core module of layout package. More...

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

Macros

#define LAYOUT_CREATE_NS(variable, sbmlns)   EXTENSION_CREATE_NS(LayoutPkgNamespaces,variable,sbmlns);
 

Enumerations

enum  SBMLLayoutTypeCode_t {
  SBML_LAYOUT_BOUNDINGBOX = 100,
  SBML_LAYOUT_COMPARTMENTGLYPH = 101,
  SBML_LAYOUT_CUBICBEZIER = 102,
  SBML_LAYOUT_CURVE = 103,
  SBML_LAYOUT_DIMENSIONS = 104,
  SBML_LAYOUT_GRAPHICALOBJECT = 105,
  SBML_LAYOUT_LAYOUT = 106,
  SBML_LAYOUT_LINESEGMENT = 107,
  SBML_LAYOUT_POINT = 108,
  SBML_LAYOUT_REACTIONGLYPH = 109,
  SBML_LAYOUT_SPECIESGLYPH = 110,
  SBML_LAYOUT_SPECIESREFERENCEGLYPH = 111,
  SBML_LAYOUT_TEXTGLYPH = 112,
  SBML_LAYOUT_REFERENCEGLYPH = 113,
  SBML_LAYOUT_GENERALGLYPH = 114
}
 SBMLFbcTypeCode_t Enumeration of possible types in the libSBML “layout” package implementation. More...
 

Detailed Description

Definition of LayoutExtension_t, the core module of layout package.

Author
Akiya Jouraku

Macro Definition Documentation

#define LAYOUT_CREATE_NS (   variable,
  sbmlns 
)    EXTENSION_CREATE_NS(LayoutPkgNamespaces,variable,sbmlns);

Enumeration Type Documentation

SBMLFbcTypeCode_t Enumeration of possible types in the libSBML “layout” 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_t 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:
    • SBase_t::getTypeCode()
    • ListOf_t::getItemTypeCode()
    (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_t 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_t::getTypeCode() and SBase_t::getPackageName() must be checked. This is particularly important for functions that take an SBML type code as an argument, such as SBase_t::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_t::getPackageName() and SBase_t::getTypeCode():

Enumerator
SBML_LAYOUT_BOUNDINGBOX 

BoundingBox

SBML_LAYOUT_COMPARTMENTGLYPH 

CompartmentGlyph

SBML_LAYOUT_CUBICBEZIER 

CubicBezier

SBML_LAYOUT_CURVE 

Curve

SBML_LAYOUT_DIMENSIONS 

Dimensions

SBML_LAYOUT_GRAPHICALOBJECT 

GraphicalObject

SBML_LAYOUT_LAYOUT 

Layout

SBML_LAYOUT_LINESEGMENT 

LineSegment

SBML_LAYOUT_POINT 

Point

SBML_LAYOUT_REACTIONGLYPH 

ReactionGlyph

SBML_LAYOUT_SPECIESGLYPH 

SpeciesGlyph

SBML_LAYOUT_SPECIESREFERENCEGLYPH 

SpeciesReferenceGlyph

SBML_LAYOUT_TEXTGLYPH 

TextGlyph

SBML_LAYOUT_REFERENCEGLYPH 

ReferenceGlyph

SBML_LAYOUT_GENERALGLYPH 

GeneralGlyph