libSBML C++ API  libSBML 5.18.0 C++ API
SBMLExtensionRegister< SBMLExtensionType > Class Template Reference

Detailed Description

template<class SBMLExtensionType>
class SBMLExtensionRegister< SBMLExtensionType >

Template class for extension package registration

@sbmlpackage{core}

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.

This is the registration template class for SBML package extensions in libSBML. It is used by package extensions to register themselves with the SBMLExtensionRegistry when libSBML starts up. An instance of this class needs to be created by each package extension and used in a call to a method on SBMLExtensionRegistry.

How to use SBMLExtensionRegister in a package extension

Examples
spec_example1.cpp, spec_example2.cpp, spec_example3.cpp, and spec_example4.cpp.

Public Member Functions

 SBMLExtensionRegister ()
 Constructor for SBMLExtensionRegister. More...
 

Constructor & Destructor Documentation

◆ SBMLExtensionRegister()

template<class SBMLExtensionType>
SBMLExtensionRegister< SBMLExtensionType >::SBMLExtensionRegister ( )
inline

Constructor for SBMLExtensionRegister.

This simple constructor arranges for the initialization code of the corresponding package extension to be executed when an object of this class is created. Specifically, it causes the init() method on the SBMLExtension-derived class to be called when the package is registered with SBMLExtensionRegistry. Extension packages should put any necessary initialization code in their init() method.