libSBML C++ API  5.18.0
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.

Public Member Functions

virtual ~DefinitionURLRegistry ()
 Destructor. More...
 

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)
 

Constructor & Destructor Documentation

virtual DefinitionURLRegistry::~DefinitionURLRegistry ( )
virtual

Destructor.

Member Function Documentation

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 AST node type
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:
void DefinitionURLRegistry::addSBMLDefinitions ( )
static
static void DefinitionURLRegistry::clearDefinitions ( )
static
static bool DefinitionURLRegistry::getCoreDefinitionsAdded ( )
static
std::string DefinitionURLRegistry::getDefinitionUrlByIndex ( int  index)
static
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.
int DefinitionURLRegistry::getNumDefinitionURLs ( )
static

Returns the number of DefinitionURLs known by the registry.

Returns
the number of registered DefinitionURLs.
See also
getDefinitionURLByIndex()
int DefinitionURLRegistry::getType ( const std::string &  url)
static