libSBML C API
5.18.0
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. It is a class used in the implementation of extra functionality provided by libSBML.
LibSBML provides a number of converters that can perform transformations on SBML documents. These converters allow their behaviors to be controlled by setting property values. Converter properties are communicated using objects of class ConversionProperties_t, and within such objects, individual options are encapsulated using ConversionOption_t objects.
A ConversionOption_t structure consists of four parts:
CNV_TYPE_
. (See the separate subsection below for more information.) There are no constraints on the values of keys or descriptions; authors of SBML converters are free to choose them as they see fit.
An option in ConversionOption_t must have a data type declared, to indicate whether it is a string value, an integer, and so forth. The possible types of values are taken from the enumeration ConversionOptionType_t. The following are the possible values:
Enumerator | Meaning |
CNV_TYPE_BOOL | Indicates the value type is a Boolean. |
CNV_TYPE_DOUBLE | Indicates the value type is a double-sized float. |
CNV_TYPE_INT | Indicates the value type is an integer. |
CNV_TYPE_SINGLE | Indicates the value type is a float. |
CNV_TYPE_STRING | Indicates the value type is a string. |
Public Member Functions | |
ConversionOption_t * | ConversionOption_clone (const ConversionOption_t *co) |
Creates and returns a deep copy of the ConversionOption_t structure. More... | |
ConversionOption_t * | ConversionOption_create (const char *key) |
Creates a new ConversionOption_t with the given key. More... | |
ConversionOption_t * | ConversionOption_createWithKeyAndType (const char *key, ConversionOptionType_t type) |
Creates a new ConversionOption_t with given key and type. More... | |
int | ConversionOption_getBoolValue (const ConversionOption_t *co) |
Returns the value (as boolean) for the given option. More... | |
const char * | ConversionOption_getDescription (const ConversionOption_t *co) |
Returns the description for the given option. More... | |
double | ConversionOption_getDoubleValue (const ConversionOption_t *co) |
Returns the value (as double) for the given option. More... | |
float | ConversionOption_getFloatValue (const ConversionOption_t *co) |
Returns the value (as float) for the given option. More... | |
int | ConversionOption_getIntValue (const ConversionOption_t *co) |
Returns the value (as integer) for the given option. More... | |
const char * | ConversionOption_getKey (const ConversionOption_t *co) |
Returns the key for the given option. More... | |
ConversionOptionType_t | ConversionOption_getType (const ConversionOption_t *co) |
Returns the type for the given option. More... | |
const char * | ConversionOption_getValue (const ConversionOption_t *co) |
Returns the value for the given option. More... | |
void | ConversionOption_setBoolValue (ConversionOption_t *co, int value) |
Sets the value for the option. More... | |
void | ConversionOption_setDescription (ConversionOption_t *co, const char *description) |
Sets the description for the option. More... | |
void | ConversionOption_setDoubleValue (ConversionOption_t *co, double value) |
Sets the value for the option. More... | |
void | ConversionOption_setFloatValue (ConversionOption_t *co, float value) |
Sets the value for the option. More... | |
void | ConversionOption_setIntValue (ConversionOption_t *co, int value) |
Sets the value for the option. More... | |
void | ConversionOption_setKey (ConversionOption_t *co, const char *key) |
Sets the key for the option. More... | |
void | ConversionOption_setType (ConversionOption_t *co, ConversionOptionType_t type) |
Sets the type for the option. More... | |
void | ConversionOption_setValue (ConversionOption_t *co, const char *value) |
Sets the value for the option. More... | |
ConversionOption_t * ConversionOption_clone | ( | const ConversionOption_t * | co | ) |
Creates and returns a deep copy of the ConversionOption_t structure.
co | the conversion option to clone. |
ConversionOption_t * ConversionOption_create | ( | const char * | key | ) |
Creates a new ConversionOption_t with the given key.
key | the key for this option. |
ConversionOption_t * ConversionOption_createWithKeyAndType | ( | const char * | key, |
ConversionOptionType_t | type | ||
) |
Creates a new ConversionOption_t with given key and type.
key | the key for this option. |
type | the type of this option. |
int ConversionOption_getBoolValue | ( | const ConversionOption_t * | co | ) |
Returns the value (as boolean) for the given option.
co | the conversion option. |
1
(true), or 0
(false). const char * ConversionOption_getDescription | ( | const ConversionOption_t * | co | ) |
Returns the description for the given option.
co | the conversion option. |
double ConversionOption_getDoubleValue | ( | const ConversionOption_t * | co | ) |
Returns the value (as double) for the given option.
co | the conversion option. |
float ConversionOption_getFloatValue | ( | const ConversionOption_t * | co | ) |
Returns the value (as float) for the given option.
co | the conversion option. |
int ConversionOption_getIntValue | ( | const ConversionOption_t * | co | ) |
Returns the value (as integer) for the given option.
co | the conversion option. |
const char * ConversionOption_getKey | ( | const ConversionOption_t * | co | ) |
Returns the key for the given option.
co | the conversion option. |
ConversionOptionType_t ConversionOption_getType | ( | const ConversionOption_t * | co | ) |
Returns the type for the given option.
co | the conversion option. |
const char * ConversionOption_getValue | ( | const ConversionOption_t * | co | ) |
Returns the value for the given option.
co | the conversion option. |
void ConversionOption_setBoolValue | ( | ConversionOption_t * | co, |
int | value | ||
) |
Sets the value for the option.
co | the conversion option. |
value | a bool representing the value to set. |
void ConversionOption_setDescription | ( | ConversionOption_t * | co, |
const char * | description | ||
) |
Sets the description for the option.
co | the conversion option. |
description | a string representing the description to set. |
void ConversionOption_setDoubleValue | ( | ConversionOption_t * | co, |
double | value | ||
) |
Sets the value for the option.
co | the conversion option. |
value | a double representing the value to set. |
void ConversionOption_setFloatValue | ( | ConversionOption_t * | co, |
float | value | ||
) |
Sets the value for the option.
co | the conversion option. |
value | a float representing the value to set. |
void ConversionOption_setIntValue | ( | ConversionOption_t * | co, |
int | value | ||
) |
Sets the value for the option.
co | the conversion option. |
value | an integer representing the value to set. |
void ConversionOption_setKey | ( | ConversionOption_t * | co, |
const char * | key | ||
) |
Sets the key for the option.
co | the conversion option. |
key | a string representing the key to set. |
void ConversionOption_setType | ( | ConversionOption_t * | co, |
ConversionOptionType_t | type | ||
) |
Sets the type for the option.
co | the conversion option. |
type | the type for this option. |
void ConversionOption_setValue | ( | ConversionOption_t * | co, |
const char * | value | ||
) |
Sets the value for the option.
co | the conversion option. |
value | a string representing the value to set. |