libSBML Perl API  libSBML 5.10.0 Perl API
 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
 {core} The core component of SBML's package extension. More...
 

Macros

#define EXTENSION_CREATE_NS(type, variable, sbmlns)
 

Detailed Description

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

Author
Akiya Jouraku

Macro Definition Documentation

#define EXTENSION_CREATE_NS (   type,
  variable,
  sbmlns 
)
Value:
type* variable;\
{\
XMLNamespaces* xmlns = sbmlns->getNamespaces();\
variable = dynamic_cast<type*>(sbmlns);\
if (variable == NULL)\
{\
variable = new type(sbmlns->getLevel(), sbmlns->getVersion());\
for (int i = 0; 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); }\
}