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.
SBMLDocumentPlugin_t * SBMLDocumentPlugin_clone (SBMLDocumentPlugin_t *plugin)
 Creates 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.
int SBMLDocumentPlugin_getRequired (SBMLDocumentPlugin_t *plugin)
 Returns the value of "required" attribute of corresponding package in the SBMLDocument element.
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.
int SBMLDocumentPlugin_setRequired (SBMLDocumentPlugin_t *plugin, int required)
 Sets the value of "required" attribute of corresponding package in the SBMLDocument element.
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.

Function Documentation

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 possible values returned by this function are:

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.

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_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 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_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 possible values returned by this function are:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines