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

Detailed Description

{core} 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
 Creates and returns a deep copy of this SBaseExtensionPoint. More...
 
const std::string & getPackageName () const
 Returns the package name of this extension point. More...
 
virtual 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...
 
virtual ~SBaseExtensionPoint ()
 

Constructor & Destructor Documentation

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

constructor

SBaseExtensionPoint::~SBaseExtensionPoint ( )
virtual
SBaseExtensionPoint::SBaseExtensionPoint ( const SBaseExtensionPoint rhs)

copy constructor

Member Function Documentation

SBaseExtensionPoint * SBaseExtensionPoint::clone ( ) const

Creates and returns a deep copy of this SBaseExtensionPoint.

Returns
a (deep) copy of this SBaseExtensionPoint.
const std::string & SBaseExtensionPoint::getPackageName ( ) const

Returns the package name of this extension point.

int SBaseExtensionPoint::getTypeCode ( ) const
virtual

Returns the typecode of this extension point.