libSBML C API  5.18.0
ModifierSpeciesReference_t Class Reference

Detailed Description

A reference to an SBML modifier species.

Sometimes a species appears in the kinetic rate formula of a reaction but is itself neither created nor destroyed in that reaction (for example, because it acts as a catalyst or inhibitor). In SBML, all such species are simply called modifiers without regard to the detailed role of those species in the model. The Reaction_t structure provides a way to express which species act as modifiers in a given reaction. This is the purpose of the list of modifiers available in Reaction_t. The list contains instances of ModifierSpeciesReference_t structures.

The ModifierSpeciesReference_t structure inherits the mandatory attribute "species" and optional attributes "id" and "name" from the parent class SimpleSpeciesReference_t. See the description of SimpleSpeciesReference_t for more information about these.

The value of the "species" attribute must be the identifier of a species defined in the enclosing Model_t; this species is designated as a modifier for the current reaction. A reaction may have any number of modifiers. It is permissible for a modifier species to appear simultaneously in the list of reactants and products of the same reaction where it is designated as a modifier, as well as to appear in the list of reactants, products and modifiers of other reactions in the model.

Public Member Functions

ModifierSpeciesReference_tModifierSpeciesReference_clone (ModifierSpeciesReference_t *msr)
 Creates a deep copy of the given ModifierSpeciesReference_t structure. More...
 
ModifierSpeciesReference_tModifierSpeciesReference_create (unsigned int level, unsigned int version)
 Creates a new ModifierSpeciesReference_t structure using the given SBML level and version values. More...
 
ModifierSpeciesReference_tModifierSpeciesReference_createWithNS (SBMLNamespaces_t *sbmlns)
 Creates a new ModifierSpeciesReference_t structure using the given SBMLNamespaces_t structure, sbmlns. More...
 
void ModifierSpeciesReference_free (ModifierSpeciesReference_t *msr)
 Frees the given ModifierSpeciesReference_t structure. More...
 
const char * ModifierSpeciesReference_getId (const ModifierSpeciesReference_t *msr)
 Returns the value of the "id" attribute of the given ModifierSpeciesReference_t structure. More...
 
const char * ModifierSpeciesReference_getName (const ModifierSpeciesReference_t *msr)
 Returns the value of the "name" attribute of the given ModifierSpeciesReference_t structure. More...
 
const char * ModifierSpeciesReference_getSpecies (const ModifierSpeciesReference_t *msr)
 Returns the value of the "species" attribute of the given ModifierSpeciesReference_t structure. More...
 
int ModifierSpeciesReference_hasRequiredAttributes (const ModifierSpeciesReference_t *msr)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given ModifierSpeciesReference_t structure have been set. More...
 
int ModifierSpeciesReference_isSetId (const ModifierSpeciesReference_t *msr)
 Predicate returning 1 (true) if the given ModifierSpeciesReference_t structure's "id" is set. More...
 
int ModifierSpeciesReference_isSetName (const ModifierSpeciesReference_t *msr)
 Predicate returning 1 (true) if the given ModifierSpeciesReference_t structure's "name" is set. More...
 
int ModifierSpeciesReference_isSetSpecies (const ModifierSpeciesReference_t *msr)
 Predicate returning 1 (true) if the given ModifierSpeciesReference_t structure's "species" is set. More...
 
int ModifierSpeciesReference_setId (ModifierSpeciesReference_t *msr, const char *id)
 Sets the "id" attribute of the given ModifierSpeciesReference_t structure. More...
 
int ModifierSpeciesReference_setName (ModifierSpeciesReference_t *msr, const char *name)
 Sets the "name" attribute of the given ModifierSpeciesReference_t structure. More...
 
int ModifierSpeciesReference_setSpecies (ModifierSpeciesReference_t *msr, const char *species)
 Sets the "species" attribute of the given ModifierSpeciesReference_t structure. More...
 
int ModifierSpeciesReference_unsetId (ModifierSpeciesReference_t *msr)
 Unsets the value of the "id" attribute of the given ModifierSpeciesReference_t structure. More...
 
int ModifierSpeciesReference_unsetName (ModifierSpeciesReference_t *msr)
 Unsets the value of the "name" attribute of the given ModifierSpeciesReference_t structure. More...
 
int ModifierSpeciesReference_unsetSpecies (ModifierSpeciesReference_t *msr)
 Unsets the value of the "species" attribute of the given ModifierSpeciesReference_t structure. More...
 

Member Function Documentation

ModifierSpeciesReference_t * ModifierSpeciesReference_clone ( ModifierSpeciesReference_t msr)

Creates a deep copy of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_t structure to be copied.
Returns
a (deep) copy of the given ModifierSpeciesReference_t structure, or a null pointer if a failure occurred.
ModifierSpeciesReference_t * ModifierSpeciesReference_create ( unsigned int  level,
unsigned int  version 
)

Creates a new ModifierSpeciesReference_t structure using the given SBML level and version values.

Parameters
levelan unsigned int, the SBML level to assign to this ModifierSpeciesReference_t structure.
versionan unsigned int, the SBML version to assign to this ModifierSpeciesReference_t structure.
Returns
the newly-created ModifierSpeciesReference_t structure, or a null pointer if an error occurred during construction.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
ModifierSpeciesReference_t * ModifierSpeciesReference_createWithNS ( SBMLNamespaces_t sbmlns)

Creates a new ModifierSpeciesReference_t structure using the given SBMLNamespaces_t structure, sbmlns.

The SBMLNamespaces_t object encapsulates SBML Level/Version/namespaces information. It is used to communicate the SBML Level, Version, and (in Level 3) packages used in addition to SBML Level 3 Core. A common approach to using libSBML's SBMLNamespaces_t facilities is to create an SBMLNamespaces_t object somewhere in a program once, then hand that object as needed to object constructors that accept SBMLNamespaces_t as arguments.
Parameters
sbmlnsan SBMLNamespaces_t structure.
Returns
the newly-created ModifierSpeciesReference_t structure, or a null pointer if an error occurred during construction.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute.
void ModifierSpeciesReference_free ( ModifierSpeciesReference_t msr)

Frees the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_t structure to be freed.
const char * ModifierSpeciesReference_getId ( const ModifierSpeciesReference_t msr)

Returns the value of the "id" attribute of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_t structure.
Returns
the id of this structure.
const char * ModifierSpeciesReference_getName ( const ModifierSpeciesReference_t msr)

Returns the value of the "name" attribute of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_t structure.
Returns
the name of this structure.
const char * ModifierSpeciesReference_getSpecies ( const ModifierSpeciesReference_t msr)

Returns the value of the "species" attribute of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_t structure.
Returns
the species of this structure.
int ModifierSpeciesReference_hasRequiredAttributes ( const ModifierSpeciesReference_t msr)

Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given ModifierSpeciesReference_t structure have been set.

Parameters
msrthe ModifierSpeciesReference_t structure to check.
Returns
1 (true) if all the required attributes for this structure have been defined, 0 (false) otherwise.
int ModifierSpeciesReference_isSetId ( const ModifierSpeciesReference_t msr)

Predicate returning 1 (true) if the given ModifierSpeciesReference_t structure's "id" is set.

Parameters
msrthe ModifierSpeciesReference_t structure.
Returns
1 (true) if the "id" of this ModifierSpeciesReference_t structure is set, 0 (false) otherwise.
int ModifierSpeciesReference_isSetName ( const ModifierSpeciesReference_t msr)

Predicate returning 1 (true) if the given ModifierSpeciesReference_t structure's "name" is set.

Parameters
msrthe ModifierSpeciesReference_t structure.
Returns
1 (true) if the "name" of this ModifierSpeciesReference_t structure is set, 0 (false) otherwise.
int ModifierSpeciesReference_isSetSpecies ( const ModifierSpeciesReference_t msr)

Predicate returning 1 (true) if the given ModifierSpeciesReference_t structure's "species" is set.

Parameters
msrthe ModifierSpeciesReference_t structure.
Returns
1 (true) if the "species" of this ModifierSpeciesReference_t structure is set, 0 (false) otherwise.
int ModifierSpeciesReference_setId ( ModifierSpeciesReference_t msr,
const char *  id 
)

Sets the "id" attribute of the given ModifierSpeciesReference_t structure.

This function copies the string given in id. If the string is a null pointer, this function is equivalent to calling ModifierSpeciesReference_unsetId().

Parameters
msrthe ModifierSpeciesReference_t structure.
idthe string to which the structures "id" attribute should be set.
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:
Note
Using this function with a null pointer for id is equivalent to unsetting the value of the "id" attribute.
int ModifierSpeciesReference_setName ( ModifierSpeciesReference_t msr,
const char *  name 
)

Sets the "name" attribute of the given ModifierSpeciesReference_t structure.

This function copies the string given in name. If the string is a null pointer, this function is equivalent to calling ModifierSpeciesReference_unsetName().

Parameters
msrthe ModifierSpeciesReference_t structure.
namethe string to which the structures "name" attribute should be set.
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:
Note
Using this function with a null pointer for name is equivalent to unsetting the value of the "name" attribute.
int ModifierSpeciesReference_setSpecies ( ModifierSpeciesReference_t msr,
const char *  species 
)

Sets the "species" attribute of the given ModifierSpeciesReference_t structure.

This function copies the string given in species. If the string is a null pointer, this function is equivalent to calling ModifierSpeciesReference_unsetSpecies().

Parameters
msrthe ModifierSpeciesReference_t structure.
speciesthe string to which the structures "species" attribute should be set.
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:
Note
Using this function with a null pointer for species is equivalent to unsetting the value of the "species" attribute.
int ModifierSpeciesReference_unsetId ( ModifierSpeciesReference_t msr)

Unsets the value of the "id" attribute of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_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 ModifierSpeciesReference_unsetName ( ModifierSpeciesReference_t msr)

Unsets the value of the "name" attribute of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_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 ModifierSpeciesReference_unsetSpecies ( ModifierSpeciesReference_t msr)

Unsets the value of the "species" attribute of the given ModifierSpeciesReference_t structure.

Parameters
msrthe ModifierSpeciesReference_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: