libSBML C API  5.18.0

Detailed Description

multi Defines a feature of a multi Species_t.

Each SpeciesFeature_t object is a child of the MultiSpeciesPlugin_t, which extends the Species_t. Each defines one feature of the parent Species_t. It has three optional attributes, "id", "name" and "component", and two required attributes, "speciesFeatureType" and "occur", and a required child ListOfSpeciesFeatureValues_t. SpeciesFeature_t serves to define the state of a component in a species by selecting values from the ListOfPossibleSpeciesFeatureValues_t of the referenced SpeciesFeatureType_t. Its "speciesFeatureType" attribue references the particular SpeciesFeatureType_t of which this Species_t is an example. The "occur" attribute defines the number of instances of the referenced SpeciesFeatureType_t. The optional "component" attribute, of type SIdRef, can be used to indicate which component of a Species_t the SpeciesFeature_t belongs to, and is required when the component cannot be identified only based on the speciesFeatureType attribute. The ListOfSpeciesFeatureValues_t contain one or more SpeciesFeatureValue_t objects—if more than one, the relationship between them is "or", defining a list of mutually exclusive possibilities. Each SpeciesFeatureValue_t serves to specify a value for a SpeciesFeature_t to select from the ListOfPossibleSpeciesFeatureValues_t defined in the referenced SpeciesFeatureType_t.

Public Member Functions

int SpeciesFeature_addSpeciesFeatureValue (SpeciesFeature_t *sf, const SpeciesFeatureValue_t *sfv)
 Adds a copy of the given SpeciesFeatureValue_t to this SpeciesFeature_t. More...
 
SpeciesFeature_tSpeciesFeature_clone (const SpeciesFeature_t *sf)
 Creates and returns a deep copy of this SpeciesFeature_t object. More...
 
SpeciesFeature_tSpeciesFeature_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new SpeciesFeature_t using the given SBML Level, Version and “multi” package version. More...
 
SpeciesFeatureValue_tSpeciesFeature_createSpeciesFeatureValue (SpeciesFeature_t *sf)
 Creates a new SpeciesFeatureValue_t object, adds it to this SpeciesFeature_t object and returns the SpeciesFeatureValue_t object created. More...
 
void SpeciesFeature_free (SpeciesFeature_t *sf)
 Frees this SpeciesFeature_t object. More...
 
char * SpeciesFeature_getComponent (const SpeciesFeature_t *sf)
 Returns the value of the "component" attribute of this SpeciesFeature_t. More...
 
char * SpeciesFeature_getId (const SpeciesFeature_t *sf)
 Returns the value of the "id" attribute of this SpeciesFeature_t. More...
 
ListOf_tSpeciesFeature_getListOfSpeciesFeatureValues (SpeciesFeature_t *sf)
 Returns a ListOf_t * containing SpeciesFeatureValue_t objects from this SpeciesFeature_t. More...
 
char * SpeciesFeature_getName (const SpeciesFeature_t *sf)
 Returns the value of the "name" attribute of this SpeciesFeature_t. More...
 
unsigned int SpeciesFeature_getNumSpeciesFeatureValues (SpeciesFeature_t *sf)
 Get the number of SpeciesFeatureValue_t objects in this SpeciesFeature_t. More...
 
unsigned int SpeciesFeature_getOccur (const SpeciesFeature_t *sf)
 Returns the value of the "occur" attribute of this SpeciesFeature_t. More...
 
char * SpeciesFeature_getSpeciesFeatureType (const SpeciesFeature_t *sf)
 Returns the value of the "speciesFeatureType" attribute of this SpeciesFeature_t. More...
 
SpeciesFeatureValue_tSpeciesFeature_getSpeciesFeatureValue (SpeciesFeature_t *sf, unsigned int n)
 Get a SpeciesFeatureValue_t from the SpeciesFeature_t. More...
 
int SpeciesFeature_hasRequiredAttributes (const SpeciesFeature_t *sf)
 Predicate returning 1 (true) if all the required attributes for this SpeciesFeature_t object have been set. More...
 
int SpeciesFeature_isSetComponent (const SpeciesFeature_t *sf)
 Predicate returning 1 (true) if this SpeciesFeature_t's "component" attribute is set. More...
 
int SpeciesFeature_isSetId (const SpeciesFeature_t *sf)
 Predicate returning 1 (true) if this SpeciesFeature_t's "id" attribute is set. More...
 
int SpeciesFeature_isSetName (const SpeciesFeature_t *sf)
 Predicate returning 1 (true) if this SpeciesFeature_t's "name" attribute is set. More...
 
int SpeciesFeature_isSetOccur (const SpeciesFeature_t *sf)
 Predicate returning 1 (true) if this SpeciesFeature_t's "occur" attribute is set. More...
 
int SpeciesFeature_isSetSpeciesFeatureType (const SpeciesFeature_t *sf)
 Predicate returning 1 (true) if this SpeciesFeature_t's "speciesFeatureType" attribute is set. More...
 
SpeciesFeatureValue_tSpeciesFeature_removeSpeciesFeatureValue (SpeciesFeature_t *sf, unsigned int n)
 Removes the nth SpeciesFeatureValue_t from this SpeciesFeature_t and returns a pointer to it. More...
 
int SpeciesFeature_setComponent (SpeciesFeature_t *sf, const char *component)
 Sets the value of the "component" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_setId (SpeciesFeature_t *sf, const char *id)
 Sets the value of the "id" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_setName (SpeciesFeature_t *sf, const char *name)
 Sets the value of the "name" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_setOccur (SpeciesFeature_t *sf, unsigned int occur)
 Sets the value of the "occur" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_setSpeciesFeatureType (SpeciesFeature_t *sf, const char *speciesFeatureType)
 Sets the value of the "speciesFeatureType" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_unsetComponent (SpeciesFeature_t *sf)
 Unsets the value of the "component" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_unsetId (SpeciesFeature_t *sf)
 Unsets the value of the "id" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_unsetName (SpeciesFeature_t *sf)
 Unsets the value of the "name" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_unsetOccur (SpeciesFeature_t *sf)
 Unsets the value of the "occur" attribute of this SpeciesFeature_t. More...
 
int SpeciesFeature_unsetSpeciesFeatureType (SpeciesFeature_t *sf)
 Unsets the value of the "speciesFeatureType" attribute of this SpeciesFeature_t. More...
 

Member Function Documentation

int SpeciesFeature_addSpeciesFeatureValue ( SpeciesFeature_t sf,
const SpeciesFeatureValue_t sfv 
)

Adds a copy of the given SpeciesFeatureValue_t to this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure to which the SpeciesFeatureValue_t should be added.
sfvthe SpeciesFeatureValue_t object to add.
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:
SpeciesFeature_t * SpeciesFeature_clone ( const SpeciesFeature_t sf)

Creates and returns a deep copy of this SpeciesFeature_t object.

Parameters
sfthe SpeciesFeature_t structure.
Returns
a (deep) copy of this SpeciesFeature_t object.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
SpeciesFeature_t * SpeciesFeature_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new SpeciesFeature_t using the given SBML Level, Version and “multi” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this SpeciesFeature_t.
versionan unsigned int, the SBML Version to assign to this SpeciesFeature_t.
pkgVersionan unsigned int, the SBML Multi Version to assign to this SpeciesFeature_t.
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. For packages, this means that the parent object to which this package element is being added must have been created with the package namespace, or that the package namespace was added to it, even if that parent is not a package object itself.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
SpeciesFeatureValue_t * SpeciesFeature_createSpeciesFeatureValue ( SpeciesFeature_t sf)

Creates a new SpeciesFeatureValue_t object, adds it to this SpeciesFeature_t object and returns the SpeciesFeatureValue_t object created.

Parameters
sfthe SpeciesFeature_t structure to which the SpeciesFeatureValue_t should be added.
Returns
a new SpeciesFeatureValue_t object instance.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
void SpeciesFeature_free ( SpeciesFeature_t sf)

Frees this SpeciesFeature_t object.

Parameters
sfthe SpeciesFeature_t structure.
char * SpeciesFeature_getComponent ( const SpeciesFeature_t sf)

Returns the value of the "component" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure whose component is sought.
Returns
the value of the "component" attribute of this SpeciesFeature_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
char * SpeciesFeature_getId ( const SpeciesFeature_t sf)

Returns the value of the "id" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure whose id is sought.
Returns
the value of the "id" attribute of this SpeciesFeature_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
ListOf_t * SpeciesFeature_getListOfSpeciesFeatureValues ( SpeciesFeature_t sf)

Returns a ListOf_t * containing SpeciesFeatureValue_t objects from this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure whose ListOfSpeciesFeatureValues_t is sought.
Returns
the ListOfSpeciesFeatureValues_t from this SpeciesFeature_t as a ListOf_t *.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
See also
SpeciesFeature_addSpeciesFeatureValue()
SpeciesFeature_createSpeciesFeatureValue()
SpeciesFeature_getSpeciesFeatureValue()
SpeciesFeature_getNumSpeciesFeatureValues()
SpeciesFeature_removeSpeciesFeatureValue()
char * SpeciesFeature_getName ( const SpeciesFeature_t sf)

Returns the value of the "name" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure whose name is sought.
Returns
the value of the "name" attribute of this SpeciesFeature_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
unsigned int SpeciesFeature_getNumSpeciesFeatureValues ( SpeciesFeature_t sf)

Get the number of SpeciesFeatureValue_t objects in this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure to query.
Returns
the number of SpeciesFeatureValue_t objects in this SpeciesFeature_t.
unsigned int SpeciesFeature_getOccur ( const SpeciesFeature_t sf)

Returns the value of the "occur" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure whose occur is sought.
Returns
the value of the "occur" attribute of this SpeciesFeature_t as a unsigned integer.
char * SpeciesFeature_getSpeciesFeatureType ( const SpeciesFeature_t sf)

Returns the value of the "speciesFeatureType" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure whose speciesFeatureType is sought.
Returns
the value of the "speciesFeatureType" attribute of this SpeciesFeature_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
SpeciesFeatureValue_t * SpeciesFeature_getSpeciesFeatureValue ( SpeciesFeature_t sf,
unsigned int  n 
)

Get a SpeciesFeatureValue_t from the SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure to search.
nan unsigned int representing the index of the SpeciesFeatureValue_t to retrieve.
Returns
the nth SpeciesFeatureValue_t in the ListOfSpeciesFeatureValues_t within this SpeciesFeature_t. If the index n is invalid, NULL is returned.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
int SpeciesFeature_hasRequiredAttributes ( const SpeciesFeature_t sf)

Predicate returning 1 (true) if all the required attributes for this SpeciesFeature_t object have been set.

Parameters
sfthe SpeciesFeature_t structure.
Returns
1 (true) to indicate that all the required attributes of this SpeciesFeature_t have been set, otherwise 0 (false) is returned.
Note
The required attributes for the SpeciesFeature_t object are:
  • "speciesFeatureType"
  • "occur"
int SpeciesFeature_isSetComponent ( const SpeciesFeature_t sf)

Predicate returning 1 (true) if this SpeciesFeature_t's "component" attribute is set.

Parameters
sfthe SpeciesFeature_t structure.
Returns
1 (true) if this SpeciesFeature_t's "component" attribute has been set, otherwise 0 (false) is returned.
int SpeciesFeature_isSetId ( const SpeciesFeature_t sf)

Predicate returning 1 (true) if this SpeciesFeature_t's "id" attribute is set.

Parameters
sfthe SpeciesFeature_t structure.
Returns
1 (true) if this SpeciesFeature_t's "id" attribute has been set, otherwise 0 (false) is returned.
int SpeciesFeature_isSetName ( const SpeciesFeature_t sf)

Predicate returning 1 (true) if this SpeciesFeature_t's "name" attribute is set.

Parameters
sfthe SpeciesFeature_t structure.
Returns
1 (true) if this SpeciesFeature_t's "name" attribute has been set, otherwise 0 (false) is returned.
int SpeciesFeature_isSetOccur ( const SpeciesFeature_t sf)

Predicate returning 1 (true) if this SpeciesFeature_t's "occur" attribute is set.

Parameters
sfthe SpeciesFeature_t structure.
Returns
1 (true) if this SpeciesFeature_t's "occur" attribute has been set, otherwise 0 (false) is returned.
int SpeciesFeature_isSetSpeciesFeatureType ( const SpeciesFeature_t sf)

Predicate returning 1 (true) if this SpeciesFeature_t's "speciesFeatureType" attribute is set.

Parameters
sfthe SpeciesFeature_t structure.
Returns
1 (true) if this SpeciesFeature_t's "speciesFeatureType" attribute has been set, otherwise 0 (false) is returned.
SpeciesFeatureValue_t * SpeciesFeature_removeSpeciesFeatureValue ( SpeciesFeature_t sf,
unsigned int  n 
)

Removes the nth SpeciesFeatureValue_t from this SpeciesFeature_t and returns a pointer to it.

Parameters
sfthe SpeciesFeature_t structure to search.
nan unsigned int representing the index of the SpeciesFeatureValue_t to remove.
Returns
a pointer to the nth SpeciesFeatureValue_t in this SpeciesFeature_t.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
int SpeciesFeature_setComponent ( SpeciesFeature_t sf,
const char *  component 
)

Sets the value of the "component" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure.
componentconst char * value of the "component" attribute to 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:
int SpeciesFeature_setId ( SpeciesFeature_t sf,
const char *  id 
)

Sets the value of the "id" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure.
idconst char * value of the "id" attribute to 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: Calling this function with id = NULL or an empty string is equivalent to calling SpeciesFeature_unsetId().
int SpeciesFeature_setName ( SpeciesFeature_t sf,
const char *  name 
)

Sets the value of the "name" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure.
nameconst char * value of the "name" attribute to 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: Calling this function with name = NULL or an empty string is equivalent to calling SpeciesFeature_unsetName().
int SpeciesFeature_setOccur ( SpeciesFeature_t sf,
unsigned int  occur 
)

Sets the value of the "occur" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure.
occurunsigned int value of the "occur" attribute to 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:
int SpeciesFeature_setSpeciesFeatureType ( SpeciesFeature_t sf,
const char *  speciesFeatureType 
)

Sets the value of the "speciesFeatureType" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_t structure.
speciesFeatureTypeconst char * value of the "speciesFeatureType" attribute to 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:
int SpeciesFeature_unsetComponent ( SpeciesFeature_t sf)

Unsets the value of the "component" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_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 SpeciesFeature_unsetId ( SpeciesFeature_t sf)

Unsets the value of the "id" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_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 SpeciesFeature_unsetName ( SpeciesFeature_t sf)

Unsets the value of the "name" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_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 SpeciesFeature_unsetOccur ( SpeciesFeature_t sf)

Unsets the value of the "occur" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_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 SpeciesFeature_unsetSpeciesFeatureType ( SpeciesFeature_t sf)

Unsets the value of the "speciesFeatureType" attribute of this SpeciesFeature_t.

Parameters
sfthe SpeciesFeature_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: