libSBML C API  5.18.0
GeneProductRef_t Class Reference

Detailed Description

fbc Reference to a gene product of a reaction

GeneProductRef_t encodes a references to a GeneProduct_t object declared in a ListOfGeneProducts_t attached to the enclosing Model_t object. GeneProductRef_t is derived from the FbcAssociation_t class.

GeneProductRef_t objects are used to construct the content of GeneProductAssociation_t objects. As described more fully in the documentation of the latter, a GeneProductAssociation_t is a container that may contain either (i) a single GeneProductRef_t or (ii) a logical expression built up with FbcAnd_t and FbcOr_t and ultimately containing two or more GeneProductRef_t objects.

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

GeneProductRef_tGeneProductRef_clone (GeneProductRef_t *gpr)
 Creates a deep copy of the given GeneProductRef_t structure. More...
 
GeneProductRef_tGeneProductRef_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new GeneProductRef_t structure using the given SBML level and version, and the pkgVersion package version. More...
 
void GeneProductRef_free (GeneProductRef_t *gpr)
 Frees the given GeneProductRef_t structure. More...
 
const char * GeneProductRef_getGeneProduct (const GeneProductRef_t *gpr)
 Returns the value of the "geneProduct" attribute of the given GeneProductRef_t structure. More...
 
const char * GeneProductRef_getId (const GeneProductRef_t *gpr)
 Returns the value of the "id" attribute of the given GeneProductRef_t structure. More...
 
const char * GeneProductRef_getName (const GeneProductRef_t *gpr)
 Returns the value of the "name" attribute of the given GeneProductRef_t structure. More...
 
int GeneProductRef_hasRequiredAttributes (const GeneProductRef_t *gpr)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes of the given GeneProductRef_t structure have been set. More...
 
int GeneProductRef_isSetGeneProduct (const GeneProductRef_t *gpr)
 Predicate returning 1 (true) if the given GeneProductRef_t structure's "geneProduct" is set. More...
 
int GeneProductRef_isSetId (const GeneProductRef_t *gpr)
 Predicate returning 1 (true) if the given GeneProductRef_t structure's "id" is set. More...
 
int GeneProductRef_isSetName (const GeneProductRef_t *gpr)
 Predicate returning 1 (true) if the given GeneProductRef_t structure's "name" is set. More...
 
int GeneProductRef_setGeneProduct (GeneProductRef_t *gpr, const char *geneProduct)
 Sets the "geneProduct" attribute of the given GeneProductRef_t structure. More...
 
int GeneProductRef_setId (GeneProductRef_t *gpr, const char *id)
 Sets the "id" attribute of the given GeneProductRef_t structure. More...
 
int GeneProductRef_setName (GeneProductRef_t *gpr, const char *name)
 Sets the "name" attribute of the given GeneProductRef_t structure. More...
 
int GeneProductRef_unsetGeneProduct (GeneProductRef_t *gpr)
 Unsets the value of the "geneProduct" attribute of the given GeneProductRef_t structure. More...
 
int GeneProductRef_unsetId (GeneProductRef_t *gpr)
 Unsets the value of the "id" attribute of the given GeneProductRef_t structure. More...
 
int GeneProductRef_unsetName (GeneProductRef_t *gpr)
 Unsets the value of the "name" attribute of the given GeneProductRef_t structure. More...
 

Member Function Documentation

GeneProductRef_t * GeneProductRef_clone ( GeneProductRef_t gpr)

Creates a deep copy of the given GeneProductRef_t structure.

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

Creates a new GeneProductRef_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 GeneProductRef_t structure.
versionan unsigned int, the SBML version to assign to this GeneProductRef_t structure.
pkgVersionan unsigned int, the version of the package to assign to this GeneProductRef_t structure.
Returns
the newly-created GeneProductRef_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 GeneProductRef_free ( GeneProductRef_t gpr)

Frees the given GeneProductRef_t structure.

Parameters
gprthe GeneProductRef_t structure to be freed.
const char * GeneProductRef_getGeneProduct ( const GeneProductRef_t gpr)

Returns the value of the "geneProduct" attribute of the given GeneProductRef_t structure.

Parameters
gprthe GeneProductRef_t structure.
Returns
the geneProduct of this structure.
const char * GeneProductRef_getId ( const GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_t structure.
Returns
the id of this structure.
const char * GeneProductRef_getName ( const GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_t structure.
Returns
the name of this structure.
int GeneProductRef_hasRequiredAttributes ( const GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_t structure to check.
Returns
1 (true) if all the required attributes for this structure have been defined, 0 (false) otherwise.
int GeneProductRef_isSetGeneProduct ( const GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_t structure.
Returns
1 (true) if the "geneProduct" of this GeneProductRef_t structure is set, 0 (false) otherwise.
int GeneProductRef_isSetId ( const GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_t structure.
Returns
1 (true) if the "id" of this GeneProductRef_t structure is set, 0 (false) otherwise.
int GeneProductRef_isSetName ( const GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_t structure.
Returns
1 (true) if the "name" of this GeneProductRef_t structure is set, 0 (false) otherwise.
int GeneProductRef_setGeneProduct ( GeneProductRef_t gpr,
const char *  geneProduct 
)

Sets the "geneProduct" attribute of the given GeneProductRef_t structure.

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

Parameters
gprthe GeneProductRef_t structure.
geneProductthe string to which the structures "geneProduct" 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 geneProduct is equivalent to unsetting the value of the "geneProduct" attribute.
int GeneProductRef_setId ( GeneProductRef_t gpr,
const char *  id 
)

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

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

Parameters
gprthe GeneProductRef_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 GeneProductRef_setName ( GeneProductRef_t gpr,
const char *  name 
)

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

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

Parameters
gprthe GeneProductRef_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 GeneProductRef_unsetGeneProduct ( GeneProductRef_t gpr)

Unsets the value of the "geneProduct" attribute of the given GeneProductRef_t structure.

Parameters
gprthe GeneProductRef_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 GeneProductRef_unsetId ( GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_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 GeneProductRef_unsetName ( GeneProductRef_t gpr)

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

Parameters
gprthe GeneProductRef_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: