libSBML C++ API
5.18.0
|
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.
The SBMLExtensionRegister class is a template class for automatically registering each package extension to the SBMLExtensionRegistry class at startup time. The class and its use are very simple. An implementation of a package extension merely needs to use it to instantiate one object. The class used in the template invocation should be the extension derived from SBMLExtension (e.g., LayoutExtension for the Layout package). The following is an example:
The line above is typically be placed in the .cpp
file associated with the definition of the SBMLExtension-derived class; in the case of the Layout package, this is LayoutExtension.cpp
.
The result of doing the above is that the init()
method on LayoutExtension
will be automatically invoked when the "register" object is instantiated. This results in initialization and registration of the package extension with libSBML.
Public Member Functions | |
SBMLExtensionRegister () | |
Constructor for SBMLExtensionRegister. More... | |
|
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.