Loading [MathJax]/jax/output/HTML-CSS/config.js
libSBML C++ API  5.20.4
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SBMLExtension.h File Reference

Definition of SBMLExtension, the core component of SBML package extension. More...

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

Classes

class  SBMLExtension
 

Macros

#define EXTENSION_CREATE_NS(type, variable, sbmlns)    EXTENSION_CREATE_NS_WITH_VERSION(type,variable,sbmlns,1)
 
#define EXTENSION_CREATE_NS_WITH_VERSION(type, variable, sbmlns, version)
 

Detailed Description

Definition of SBMLExtension, the core component of SBML package extension.

Author
Akiya Jouraku

Macro Definition Documentation

◆ EXTENSION_CREATE_NS

#define EXTENSION_CREATE_NS (   type,
  variable,
  sbmlns 
)     EXTENSION_CREATE_NS_WITH_VERSION(type,variable,sbmlns,1)

◆ EXTENSION_CREATE_NS_WITH_VERSION

#define EXTENSION_CREATE_NS_WITH_VERSION (   type,
  variable,
  sbmlns,
  version 
)
Value:
type* variable;\
{\
XMLNamespaces* xmlns = sbmlns->getNamespaces();\
variable = dynamic_cast<type*>(sbmlns);\
if (variable == NULL)\
{\
try\
{\
variable = new type(sbmlns->getLevel(), sbmlns->getVersion(), version);\
}\
{\
variable = new type(sbmlns->getLevel(), 1, version);\
}\
for (int i = 0; xmlns != NULL && i < xmlns->getNumNamespaces(); ++i)\
{\
if (!variable->getNamespaces()->hasURI(xmlns->getURI(i)))\
variable->getNamespaces()->add(xmlns->getURI(i), xmlns->getPrefix(i));\
}\
}\
else { variable = new type(*variable); }\
}
Definition SBMLExtensionException.h:65
Definition XMLNamespaces.h:90
std::string getURI(int index) const
Look up the URI of an XML namespace declaration by its position.
Definition XMLNamespaces.cpp:303
std::string getPrefix(int index) const
Look up the prefix of an XML namespace declaration by its position.
Definition XMLNamespaces.cpp:280
int getNumNamespaces() const
Returns the total number of URI-and-prefix pairs stored in this particular XMLNamespaces instance.
Definition XMLNamespaces.cpp:268