libSBML C++ API  5.20.4
DefinitionURLRegistry Class Reference

Detailed Description

Registry of all libSBML SBML DefinitionURLs.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.

LibSBML provides facilities for transforming and converting SBML documents in various ways. These transformations can involve essentially anything that can be written algorithmically; examples include converting the units of measurement in a model, or converting from one Level+Version combination of SBML to another. DefinitionURLs are implemented as objects derived from the class DefinitionURL.

The DefinitionURL registry, implemented as a singleton object of class DefinitionURLRegistry, maintains a list of known DefinitionURLs and provides methods for discovering them. Callers can use the method DefinitionURLRegistry::getNumDefinitionURLs() to find out how many DefinitionURLs are registered, then use DefinitionURLRegistry::getDefinitionURLByIndex() to iterate over each one; alternatively, callers can use DefinitionURLRegistry::getDefinitionURLFor() to search for a DefinitionURL having specific properties.

Static Public Member Functions

static int addDefinitionURL (const std::string &url, int type)
 Adds the given DefinitionURL to the registry of SBML DefinitionURLs. More...
 
static void addSBMLDefinitions ()
 
static void clearDefinitions ()
 
static bool getCoreDefinitionsAdded ()
 
static std::string getDefinitionUrlByIndex (int index)
 
static DefinitionURLRegistrygetInstance ()
 Returns the singleton instance for the DefinitionURL registry. More...
 
static int getNumDefinitionURLs ()
 Returns the number of DefinitionURLs known by the registry. More...
 
static int getType (const std::string &url)
 

Member Function Documentation

◆ addDefinitionURL()

int DefinitionURLRegistry::addDefinitionURL ( const std::string &  url,
int  type 
)
static

Adds the given DefinitionURL to the registry of SBML DefinitionURLs.

Parameters
urlthe DefinitionURL to add to the registry.
typethe ASTNodeType_t of the URL to add to the registry.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:

◆ addSBMLDefinitions()

void DefinitionURLRegistry::addSBMLDefinitions ( )
static

◆ clearDefinitions()

static void DefinitionURLRegistry::clearDefinitions ( )
static

◆ getCoreDefinitionsAdded()

static bool DefinitionURLRegistry::getCoreDefinitionsAdded ( )
static

◆ getDefinitionUrlByIndex()

std::string DefinitionURLRegistry::getDefinitionUrlByIndex ( int  index)
static

◆ getInstance()

DefinitionURLRegistry & DefinitionURLRegistry::getInstance ( )
static

Returns the singleton instance for the DefinitionURL registry.

Prior to using the registry, callers have to obtain a copy of the registry. This static method provides the means for doing that.

Returns
the singleton for the DefinitionURL registry.

◆ getNumDefinitionURLs()

int DefinitionURLRegistry::getNumDefinitionURLs ( )
static

Returns the number of DefinitionURLs known by the registry.

Returns
the number of registered DefinitionURLs.
See also
getDefinitionURLByIndex()

◆ getType()

int DefinitionURLRegistry::getType ( const std::string &  url)
static