SBMLExtensionRegistry Class Reference

List of all members.

Public Member Functions

int addExtension (const SBMLExtension *ext)
 Add the given SBMLExtension to this SBMLExtensionRegistry.
SBMLExtension * getExtension (const std::string &package)
 Returns an SBMLExtension object with the given package URI or package name (string).
unsigned int getNumExtension (const SBaseExtensionPoint &extPoint)
 Returns the number of SBMLExtension* with the given extension point.
bool isEnabled (const std::string &uri)
 Checks if the extension with the given URI is enabled (true) or disabled (false)
bool isRegistered (const std::string &uri)
 Checks if the extension with the given URI is registered (true) or not (false)
bool setEnabled (const std::string &uri, bool isEnabled)
 Enable/disable the package with the given uri.

Static Public Member Functions

static SBMLExtensionRegistry & getInstance ()
 Returns an instance (singleton) of the SBMLExtensionRegistry class.
static unsigned int getNumRegisteredPackages ()
 Returns the number of registered packages.
static std::string getRegisteredPackageName (unsigned int index)
 Returns the registered package name at the given index.
static List * getRegisteredPackageNames ()
 Returns a list of registered packages (such as 'layout', 'fbc' or 'comp') the list contains char* strings and has to be freed by the caller.

Member Function Documentation

Add the given SBMLExtension to this SBMLExtensionRegistry.

Parameters:
extthe SBMLExtension object to be added.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
SBMLExtension * SBMLExtensionRegistry::getExtension ( const std::string &  package)

Returns an SBMLExtension object with the given package URI or package name (string).

Parameters:
packagethe URI or name of the package extension
Returns:
a clone of the SBMLExtension object with the given package URI or name. The returned extension is to be freed (i.e.: deleted) by the caller!

Returns an instance (singleton) of the SBMLExtensionRegistry class.

This function needs to be invoked when manipulating the SBMLExtensionRegistry class.

Returns:
the instance of the SBMLExtensionRegistry object.
unsigned int SBMLExtensionRegistry::getNumExtension ( const SBaseExtensionPoint &  extPoint)

Returns the number of SBMLExtension* with the given extension point.

Parameters:
extPointthe SBaseExtensionPoint
Returns:
the number of SBMLExtension* with the given extension point.

Returns the number of registered packages.

Returns:
the number of registered packages.
std::string SBMLExtensionRegistry::getRegisteredPackageName ( unsigned int  index) [static]

Returns the registered package name at the given index.

Parameters:
indexzero based index of the package name to return
Returns:
the package name with the given index or NULL

Returns a list of registered packages (such as 'layout', 'fbc' or 'comp') the list contains char* strings and has to be freed by the caller.

Returns:
the names of the registered packages in a list
bool SBMLExtensionRegistry::isEnabled ( const std::string &  uri)

Checks if the extension with the given URI is enabled (true) or disabled (false)

Parameters:
urithe URI of the target package.
Returns:
false will be returned if the given package is disabled or not registered, otherwise true will be returned.
bool SBMLExtensionRegistry::isRegistered ( const std::string &  uri)

Checks if the extension with the given URI is registered (true) or not (false)

Parameters:
urithe URI of the target package.
Returns:
true will be returned if the package with the given URI is registered, otherwise false will be returned.
bool SBMLExtensionRegistry::setEnabled ( const std::string &  uri,
bool  isEnabled 
)

Enable/disable the package with the given uri.

Parameters:
urithe URI of the target package.
isEnabledthe bool value corresponding to enabled (true) or disabled (false)
Returns:
false will be returned if the given bool value is false or the given package is not registered, otherwise true will be returned.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines