libSBML C++ API  libSBML 5.8.0 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SBMLDocumentPlugin.cpp File Reference

Detailed Description

Implementation of SBMLDocumentPlugin, the derived class of SBasePlugin.

Author
Akiya Jouraku
Include dependency graph for SBMLDocumentPlugin.cpp:

Functions

int SBMLDocumentPlugin_addExpectedAttributes (SBMLDocumentPlugin_t *plugin, ExpectedAttributes_t *attributes)
 Subclasses should override this method to get the list of expected attributes if they have their specific attributes. More...
 
SBMLDocumentPlugin_tSBMLDocumentPlugin_clone (SBMLDocumentPlugin_t *plugin)
 Creates a deep copy of the given SBMLDocumentPlugin_t structure. More...
 
SBMLDocumentPlugin_tSBMLDocumentPlugin_create (const char *uri, const char *prefix, SBMLNamespaces_t *sbmlns)
 Creates a new SBMLDocumentPlugin_t structure with the given package uri, prefix and SBMLNamespaces. More...
 
int SBMLDocumentPlugin_getRequired (SBMLDocumentPlugin_t *plugin)
 Returns the value of "required" attribute of corresponding package in the SBMLDocument element. More...
 
int SBMLDocumentPlugin_isSetRequired (SBMLDocumentPlugin_t *plugin)
 
int SBMLDocumentPlugin_readAttributes (SBMLDocumentPlugin_t *plugin, const XMLAttributes_t *attributes, const ExpectedAttributes_t *expectedAttributes)
 Subclasses must override this method to read values from the given XMLAttributes if they have their specific attributes. More...
 
int SBMLDocumentPlugin_setRequired (SBMLDocumentPlugin_t *plugin, int required)
 Sets the value of "required" attribute of corresponding package in the SBMLDocument element. More...
 
int SBMLDocumentPlugin_unsetRequired (SBMLDocumentPlugin_t *plugin)
 
int SBMLDocumentPlugin_writeAttributes (SBMLDocumentPlugin_t *plugin, XMLOutputStream_t *stream)
 Subclasses must override this method to write their XML attributes to the XMLOutputStream if they have their specific attributes. More...
 

Function Documentation

int SBMLDocumentPlugin_addExpectedAttributes ( SBMLDocumentPlugin_t plugin,
ExpectedAttributes_t attributes 
)

Subclasses should override this method to get the list of expected attributes if they have their specific attributes.

This function is invoked from corresponding readAttributes() function.

Parameters
pluginthe SBMLDocumentPlugin_t structure
attributesthe ExpectedAttributes_t structure
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:
SBMLDocumentPlugin_t* SBMLDocumentPlugin_clone ( SBMLDocumentPlugin_t plugin)

Creates a deep copy of the given SBMLDocumentPlugin_t structure.

Parameters
pluginthe SBMLDocumentPlugin_t structure to be copied
Returns
a (deep) copy of the given SBMLDocumentPlugin_t structure.
SBMLDocumentPlugin_t* SBMLDocumentPlugin_create ( const char *  uri,
const char *  prefix,
SBMLNamespaces_t sbmlns 
)

Creates a new SBMLDocumentPlugin_t structure with the given package uri, prefix and SBMLNamespaces.

Parameters
urithe package uri
prefixthe package prefix
sbmlnsthe namespaces
Returns
a new SBMLDocumentPlugin_t structure with the given package uri, prefix and SBMLNamespaces. Or null in case a NULL uri or prefix was given.
int SBMLDocumentPlugin_getRequired ( SBMLDocumentPlugin_t plugin)

Returns the value of "required" attribute of corresponding package in the SBMLDocument element.

The value is true (1) if the package is required, or false (0) otherwise.

Parameters
pluginthe SBMLDocumentPlugin_t structure
Returns
the value of "required" attribute of corresponding package in the SBMLDocument element. The value is true (1) if the package is required, or false (0) otherwise. If the plugin is invalid LIBSBML_INVALID_OBJECT will be returned.
int SBMLDocumentPlugin_isSetRequired ( SBMLDocumentPlugin_t plugin)
int SBMLDocumentPlugin_readAttributes ( SBMLDocumentPlugin_t plugin,
const XMLAttributes_t attributes,
const ExpectedAttributes_t expectedAttributes 
)

Subclasses must override this method to read values from the given XMLAttributes if they have their specific attributes.

Parameters
pluginthe SBMLDocumentPlugin_t structure
attributesthe XMLAttributes_t structure
expectedAttributesthe ExpectedAttributes_t structure
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:
int SBMLDocumentPlugin_setRequired ( SBMLDocumentPlugin_t plugin,
int  required 
)

Sets the value of "required" attribute of corresponding package in the SBMLDocument element.

The value is true (1) if the package is required, or false (0) otherwise.

Parameters
pluginthe SBMLDocumentPlugin_t structure
requiredthe new value for the "required" attribute.
Returns
the value of "required" attribute of corresponding package in the SBMLDocument element. The value is true (1) if the package is required, or false (0) otherwise. If the plugin is invalid LIBSBML_INVALID_OBJECT will be returned.
int SBMLDocumentPlugin_unsetRequired ( SBMLDocumentPlugin_t plugin)
int SBMLDocumentPlugin_writeAttributes ( SBMLDocumentPlugin_t plugin,
XMLOutputStream_t *  stream 
)

Subclasses must override this method to write their XML attributes to the XMLOutputStream if they have their specific attributes.

Parameters
pluginthe SBMLDocumentPlugin_t structure
streamthe XMLOutputStream_t structure
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: