libSBML C API  5.18.0
GeneProduct_t Class Reference

Detailed Description

fbc Association_t of a gene product with a Reaction_t

In the SBML Level 3 Flux Balance Constraints (“fbc”) package representation format, a GeneProduct_t object represents a single gene or implied gene product. The gene or gene product is identified using the required attribute "label", which is a text string. (This attribute is separate from the usual SBML "id" attribute, which is used to cross-reference entities within an SBML model.) A GeneProduct_t object can also possess an optional "associatedSpecies" attribute; if this a attribute is defined, it should have a value of type SIdRef and be the identifier of a Species_t object defined in the enclosing Model_t. An "associatedSpecies", if it exists, is interpreted to be a species associated with the gene or gene product that is represented by the GeneProduct_t object.

Note
This class of objects was introduced in Version 2 of the SBML Level 3 Flux Balance Constraints (“fbc”) specification. In Version 1 of “fbc”, the information encoded by this class can be stored instead using the Association_t and GeneAssociation_t annotation classes. Please see the Version 1 and Version 2 “fbc” specifications for more details.

Public Member Functions

GeneProduct_tGeneProduct_clone (GeneProduct_t *gp)
 Creates a deep copy of the given GeneProduct_t structure. More...
 
GeneProduct_tGeneProduct_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new GeneProduct_t structure using the given SBML level and version, and the pkgVersion package version. More...
 
void GeneProduct_free (GeneProduct_t *gp)
 Frees the given GeneProduct_t structure. More...
 
const char * GeneProduct_getAssociatedSpecies (const GeneProduct_t *gp)
 Returns the value of the "associatedSpecies" attribute of the given GeneProduct_t structure. More...
 
const char * GeneProduct_getId (const GeneProduct_t *gp)
 Returns the value of the "id" attribute of the given GeneProduct_t structure. More...
 
const char * GeneProduct_getLabel (const GeneProduct_t *gp)
 Returns the value of the "label" attribute of the given GeneProduct_t structure. More...
 
const char * GeneProduct_getName (const GeneProduct_t *gp)
 Returns the value of the "name" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_hasRequiredAttributes (const GeneProduct_t *gp)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given GeneProduct_t structure have been set. More...
 
int GeneProduct_isSetAssociatedSpecies (const GeneProduct_t *gp)
 Predicate returning 1 (true) if the given GeneProduct_t structure's "associatedSpecies" is set. More...
 
int GeneProduct_isSetId (const GeneProduct_t *gp)
 Predicate returning 1 (true) if the given GeneProduct_t structure's "id" is set. More...
 
int GeneProduct_isSetLabel (const GeneProduct_t *gp)
 Predicate returning 1 (true) if the given GeneProduct_t structure's "label" is set. More...
 
int GeneProduct_isSetName (const GeneProduct_t *gp)
 Predicate returning 1 (true) if the given GeneProduct_t structure's "name" is set. More...
 
int GeneProduct_setAssociatedSpecies (GeneProduct_t *gp, const char *associatedSpecies)
 Sets the "associatedSpecies" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_setId (GeneProduct_t *gp, const char *id)
 Sets the "id" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_setLabel (GeneProduct_t *gp, const char *label)
 Sets the "label" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_setName (GeneProduct_t *gp, const char *name)
 Sets the "name" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_unsetAssociatedSpecies (GeneProduct_t *gp)
 Unsets the value of the "associatedSpecies" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_unsetId (GeneProduct_t *gp)
 Unsets the value of the "id" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_unsetLabel (GeneProduct_t *gp)
 Unsets the value of the "label" attribute of the given GeneProduct_t structure. More...
 
int GeneProduct_unsetName (GeneProduct_t *gp)
 Unsets the value of the "name" attribute of the given GeneProduct_t structure. More...
 

Member Function Documentation

GeneProduct_t * GeneProduct_clone ( GeneProduct_t gp)

Creates a deep copy of the given GeneProduct_t structure.

Parameters
gpthe GeneProduct_t structure to be copied.
Returns
a (deep) copy of the given GeneProduct_t structure, or a null pointer if a failure occurred.
GeneProduct_t * GeneProduct_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new GeneProduct_t structure using the given SBML level and version, and the pkgVersion package version.

Parameters
levelan unsigned int, the SBML level to assign to this GeneProduct_t structure.
versionan unsigned int, the SBML version to assign to this GeneProduct_t structure.
pkgVersionan unsigned int, the version of the package to assign to this GeneProduct_t structure.
Returns
the newly-created GeneProduct_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 GeneProduct_free ( GeneProduct_t gp)

Frees the given GeneProduct_t structure.

Parameters
gpthe GeneProduct_t structure to be freed.
const char * GeneProduct_getAssociatedSpecies ( const GeneProduct_t gp)

Returns the value of the "associatedSpecies" attribute of the given GeneProduct_t structure.

Parameters
gpthe GeneProduct_t structure.
Returns
the associatedSpecies of this structure.
const char * GeneProduct_getId ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure.
Returns
the id of this structure.
const char * GeneProduct_getLabel ( const GeneProduct_t gp)

Returns the value of the "label" attribute of the given GeneProduct_t structure.

Parameters
gpthe GeneProduct_t structure.
Returns
the label of this structure.
const char * GeneProduct_getName ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure.
Returns
the name of this structure.
int GeneProduct_hasRequiredAttributes ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure to check.
Returns
1 (true) if all the required attributes for this structure have been defined, 0 (false) otherwise.
int GeneProduct_isSetAssociatedSpecies ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure.
Returns
1 (true) if the "associatedSpecies" of this GeneProduct_t structure is set, 0 (false) otherwise.
int GeneProduct_isSetId ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure.
Returns
1 (true) if the "id" of this GeneProduct_t structure is set, 0 (false) otherwise.
int GeneProduct_isSetLabel ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure.
Returns
1 (true) if the "label" of this GeneProduct_t structure is set, 0 (false) otherwise.
int GeneProduct_isSetName ( const GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_t structure.
Returns
1 (true) if the "name" of this GeneProduct_t structure is set, 0 (false) otherwise.
int GeneProduct_setAssociatedSpecies ( GeneProduct_t gp,
const char *  associatedSpecies 
)

Sets the "associatedSpecies" attribute of the given GeneProduct_t structure.

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

Parameters
gpthe GeneProduct_t structure.
associatedSpeciesthe string to which the structures "associatedSpecies" 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 associatedSpecies is equivalent to unsetting the value of the "associatedSpecies" attribute.
int GeneProduct_setId ( GeneProduct_t gp,
const char *  id 
)

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

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

Parameters
gpthe GeneProduct_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 GeneProduct_setLabel ( GeneProduct_t gp,
const char *  label 
)

Sets the "label" attribute of the given GeneProduct_t structure.

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

Parameters
gpthe GeneProduct_t structure.
labelthe string to which the structures "label" 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 label is equivalent to unsetting the value of the "label" attribute.
int GeneProduct_setName ( GeneProduct_t gp,
const char *  name 
)

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

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

Parameters
gpthe GeneProduct_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 GeneProduct_unsetAssociatedSpecies ( GeneProduct_t gp)

Unsets the value of the "associatedSpecies" attribute of the given GeneProduct_t structure.

Parameters
gpthe GeneProduct_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 GeneProduct_unsetId ( GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_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 GeneProduct_unsetLabel ( GeneProduct_t gp)

Unsets the value of the "label" attribute of the given GeneProduct_t structure.

Parameters
gpthe GeneProduct_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 GeneProduct_unsetName ( GeneProduct_t gp)

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

Parameters
gpthe GeneProduct_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: