libSBML Perl API  libSBML 5.8.0 Perl API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SBaseExtensionPoint Class Reference

Detailed Description

Representation of an extension point of SBML's package extension.

SBaseExtensionPoint represents an element to be extended (extension point) and the extension point is identified by a combination of a package name and a typecode of the element.

For example, an SBaseExtensionPoint object which represents an extension point of the model element defined in the core package can be created as follows:

      SBaseExtensionPoint  modelextp("core", SBML_MODEL);

Similarly, an SBaseExtensionPoint object which represents an extension point of the layout element defined in the layout extension can be created as follows:

      SBaseExtensionPoint  layoutextp("layout", SBML_LAYOUT_LAYOUT);

SBaseExtensionPoint object is required as one of arguments of the constructor of SBasePluginCreator<class SBasePluginType, class SBMLExtensionType> template class to identify an extension poitnt to which the plugin object created by the creator class is plugged in. For example, the SBasePluginCreator class which creates a LayoutModelPlugin object of the layout extension which is plugged in to the model element of the core package can be created with the corresponding SBaseExtensionPoint object as follows:

  // std::vector object that contains a list of URI (package versions) supported 
  // by the plugin object.
  std::vector<std::string> packageURIs;
  packageURIs.push_back(getXmlnsL3V1V1());
  packageURIs.push_back(getXmlnsL2());  

  // creates an extension point (model element of the "core" package)
  SBaseExtensionPoint  modelExtPoint("core",SBML_MODEL);
   
  // creates an SBasePluginCreator object 
  SBasePluginCreator<LayoutModelPlugin, LayoutExtension>  modelPluginCreator(modelExtPoint,packageURIs);

This kind of code is implemented in init() function of each SBMLExtension derived classes.

Public Member Functions

SBaseExtensionPointclone () const
 clone More...
 
const std::string & getPackageName () const
 Returns the package name of this extension point. More...
 
int getTypeCode () const
 Returns the typecode of this extension point. More...
 
 SBaseExtensionPoint (const std::string &pkgName, int typeCode)
 constructor More...
 
 SBaseExtensionPoint (const SBaseExtensionPoint &rhs)
 copy constructor More...
 

Constructor & Destructor Documentation

SBaseExtensionPoint::SBaseExtensionPoint ( const std::string &  pkgName,
int  typeCode 
)

constructor

SBaseExtensionPoint::SBaseExtensionPoint ( const SBaseExtensionPoint rhs)

copy constructor

Member Function Documentation

SBaseExtensionPoint * SBaseExtensionPoint::clone ( ) const

clone

const std::string & SBaseExtensionPoint::getPackageName ( ) const

Returns the package name of this extension point.

int SBaseExtensionPoint::getTypeCode ( ) const

Returns the typecode of this extension point.