libSBML Python API
5.20.2
|
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.