libSBML C API  5.18.0
Association_t Class Reference

Detailed Description

fbc Annotation helper class for “fbc” Version 1.

This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.

The Association_t class is a helper class for creating annotations to store gene association information in Version 1 of the SBML Level 3 Flux Balance Constraints (“fbc”) package. In “fbc” Version 2, the equivalent capability is handled by the FbcAssociation_t class and this class (Association_t) is not used.

See also
FbcAssociation_t
ListOfFbcAssociations_t

Public Member Functions

Association_tAssociation_clone (const Association_t *a)
 Creates and returns a deep copy of this Association_t object. More...
 
FbcAnd_tAssociation_createFbcAnd (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new FbcAnd_t (Association_t) using the given SBML Level, Version and “fbc” package version. More...
 
FbcOr_tAssociation_createFbcOr (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new FbcOr_t (Association_t) using the given SBML Level, Version and “fbc” package version. More...
 
GeneProductRef_tAssociation_createGeneProductRef (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new GeneProductRef_t (Association_t) using the given SBML Level, Version and “fbc” package version. More...
 
void Association_free (Association_t *a)
 Frees this Association_t object. More...
 
int Association_isFbcAnd (const Association_t *a)
 Predicate returning 1 if this Association_t is of type FbcAnd_t. More...
 
int Association_isFbcOr (const Association_t *a)
 Predicate returning 1 if this Association_t is of type FbcOr_t. More...
 
int Association_isGeneProductRef (const Association_t *a)
 Predicate returning 1 if this Association_t is of type GeneProductRef_t. More...
 

Member Function Documentation

Association_t * Association_clone ( const Association_t a)

Creates and returns a deep copy of this Association_t object.

Parameters
athe Association_t structure.
Returns
a (deep) copy of this Association_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.
FbcAnd_t * Association_createFbcAnd ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new FbcAnd_t (Association_t) using the given SBML Level, Version and “fbc” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this Association_t.
versionan unsigned int, the SBML Version to assign to this Association_t.
pkgVersionan unsigned int, the SBML Fbc Version to assign to this Association_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.
FbcOr_t * Association_createFbcOr ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new FbcOr_t (Association_t) using the given SBML Level, Version and “fbc” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this Association_t.
versionan unsigned int, the SBML Version to assign to this Association_t.
pkgVersionan unsigned int, the SBML Fbc Version to assign to this Association_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.
GeneProductRef_t * Association_createGeneProductRef ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new GeneProductRef_t (Association_t) using the given SBML Level, Version and “fbc” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this Association_t.
versionan unsigned int, the SBML Version to assign to this Association_t.
pkgVersionan unsigned int, the SBML Fbc Version to assign to this Association_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.
void Association_free ( Association_t a)

Frees this Association_t object.

Parameters
athe Association_t structure.
int Association_isFbcAnd ( const Association_t a)

Predicate returning 1 if this Association_t is of type FbcAnd_t.

Parameters
athe Association_t structure.
Returns
1 if this Association_t is of type FbcAnd_t, 0 otherwise
int Association_isFbcOr ( const Association_t a)

Predicate returning 1 if this Association_t is of type FbcOr_t.

Parameters
athe Association_t structure.
Returns
1 if this Association_t is of type FbcOr_t, 0 otherwise
int Association_isGeneProductRef ( const Association_t a)

Predicate returning 1 if this Association_t is of type GeneProductRef_t.

Parameters
athe Association_t structure.
Returns
1 if this Association_t is of type GeneProductRef_t, 0 otherwise