Loading [MathJax]/extensions/tex2jax.js
libSBML C++ API  5.20.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FbcExtension.cpp File Reference

Implementation of FbcExtension, the core module of fbc package. More...

Include dependency graph for FbcExtension.cpp:

Functions

FbcVariableType_t FbcVariableType_fromString (const char *code)
 Returns the FbcVariableType_t enumeration corresponding to the given string or FBC_VARIABLE_TYPE_INVALID if there is no such match. More...
 
int FbcVariableType_isValid (FbcVariableType_t fvt)
 Predicate returning 1 (true) or 0 (false) depending on whether the given FbcVariableType_t is valid. More...
 
int FbcVariableType_isValidString (const char *code)
 Predicate returning 1 (true) or 0 (false) depending on whether the given string is a valid FbcVariableType_t. More...
 
const char * FbcVariableType_toString (FbcVariableType_t fvt)
 Returns the string version of the provided FbcVariableType_t enumeration. More...
 

Variables

static const packageErrorTableEntryV3 defaultErrorTableV3 []
 
static SBMLExtensionRegister< FbcExtensionfbcExtensionRegistry
 
static const char * SBML_FBC_TYPECODE_STRINGS []
 
static const char * SBML_FBC_VARIABLE_TYPE_STRINGS []
 

Detailed Description

Implementation of FbcExtension, the core module of fbc package.

Author
Akiya Jouraku
Frank Bergmann

Function Documentation

◆ FbcVariableType_fromString()

FbcVariableType_t FbcVariableType_fromString ( const char *  code)

Returns the FbcVariableType_t enumeration corresponding to the given string or FBC_VARIABLE_TYPE_INVALID if there is no such match.

Parameters
codethe string to convert to a FbcVariableType_t.
Returns
the corresponding FbcVariableType_t or FBC_VARIABLE_TYPE_INVALID if no match is found.
Note
The matching is case-sensitive: "linear" will return FBC_VARIABLE_TYPE_LINEAR, but "Linear" will return FBC_VARIABLE_TYPE_INVALID.

◆ FbcVariableType_isValid()

int FbcVariableType_isValid ( FbcVariableType_t  fvt)

Predicate returning 1 (true) or 0 (false) depending on whether the given FbcVariableType_t is valid.

Parameters
fvtthe FbcVariableType_t enumeration to query.
Returns
1 (true) if the FbcVariableType_t is FBC_VARIABLE_TYPE_LINEAR, or FBC_VARIABLE_TYPE_QUADRATIC; 0 (false) otherwise (including FBC_VARIABLE_TYPE_INVALID).

◆ FbcVariableType_isValidString()

int FbcVariableType_isValidString ( const char *  code)

Predicate returning 1 (true) or 0 (false) depending on whether the given string is a valid FbcVariableType_t.

Parameters
codethe string to query.
Returns
1 (true) if the string is "linear", "quadratic", or "invalid FbcVariableType value"; 0 (false) otherwise.
Note
The matching is case-sensitive: "linear" will return 1 (true), but "Linear" will return 0 (false).

◆ FbcVariableType_toString()

const char* FbcVariableType_toString ( FbcVariableType_t  fvt)

Returns the string version of the provided FbcVariableType_t enumeration.

Parameters
fvtthe FbcVariableType_t enumeration value to convert.
Returns
A string corresponding to the given type: "linear", "quadratic", "invalid FbcVariableType value", or NULL if the value is FBC_VARIABLE_TYPE_INVALID or another invalid enumeration value.
Note
The string returned by this function is a pointer to a string literal defined in the libSBML library, and may not be modified or deleted.

Variable Documentation

◆ defaultErrorTableV3

const packageErrorTableEntryV3 defaultErrorTableV3[]
static
Initial value:
=
{
{ 0,
"",
0,
"",
{ "",
"",
""
}
}
}
@ LIBSBML_SEV_ERROR
Definition: XMLError.h:534

◆ fbcExtensionRegistry

SBMLExtensionRegister<FbcExtension> fbcExtensionRegistry
static

◆ SBML_FBC_TYPECODE_STRINGS

const char* SBML_FBC_TYPECODE_STRINGS[]
static
Initial value:
=
{
"Association"
, "FluxBound"
, "FluxObjective"
, "GeneAssociation"
, "Objective"
, "FbcAssociation"
, "GeneProductAssociation"
, "GeneProduct"
, "GeneProductRef"
, "FbcAnd"
, "FbcOr"
, "UserDefinedConstraintComponent"
, "UserDefinedConstraint"
, "KeyValuePair"
}

◆ SBML_FBC_VARIABLE_TYPE_STRINGS

const char* SBML_FBC_VARIABLE_TYPE_STRINGS[]
static
Initial value:
=
{
"linear"
, "quadratic"
, "invalid FbcVariableType value"
}