libSBML C++ API  libSBML 5.8.0 C++ API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConversionProperties.cpp File Reference

Detailed Description

Implemenentation of ConversionProperties, the class encapsulating conversion configuration.

Author
Frank Bergmann
Include dependency graph for ConversionProperties.cpp:

Functions

void ConversionProperties_addOption (ConversionProperties_t *cp, const ConversionOption_t *option)
 Adds a copy of the given ConversionOption structure to the properties. More...
 
void ConversionProperties_addOptionWithKey (ConversionProperties_t *cp, const char *key)
 Adds a new ConversionOption structure with the given key to the properties. More...
 
ConversionProperties_tConversionProperties_clone (const ConversionProperties_t *cp)
 Creates and returns a deep copy of the given ConversionProperties object. More...
 
ConversionProperties_tConversionProperties_create ()
 creates a new conversion properties structure (without namespace) More...
 
ConversionProperties_tConversionProperties_createWithSBMLNamespace (SBMLNamespaces_t *sbmlns)
 creates a new conversion properties structure with a specific SBML target namespace. More...
 
int ConversionProperties_getBoolValue (const ConversionProperties_t *cp, const char *key)
 Returns the value as boolean for a given option in the properties object. More...
 
char * ConversionProperties_getDescription (const ConversionProperties_t *cp, const char *key)
 Returns the description string for a given option in the properties object. More...
 
double ConversionProperties_getDoubleValue (const ConversionProperties_t *cp, const char *key)
 Returns the value as double for a given option in the properties object. More...
 
float ConversionProperties_getFloatValue (const ConversionProperties_t *cp, const char *key)
 Returns the value as float for a given option in the properties object. More...
 
int ConversionProperties_getIntValue (const ConversionProperties_t *cp, const char *key)
 Returns the value as integer for a given option in the properties object. More...
 
const ConversionOption_tConversionProperties_getOption (const ConversionProperties_t *cp, const char *key)
 Returns the ConversionOption object for a given key. More...
 
const SBMLNamespaces_tConversionProperties_getTargetNamespaces (const ConversionProperties_t *cp)
 Returns the current target SBML namespace of the conversion properties. More...
 
ConversionOptionType_t ConversionProperties_getType (const ConversionProperties_t *cp, const char *key)
 Returns the type of a given option in the properties object. More...
 
char * ConversionProperties_getValue (const ConversionProperties_t *cp, const char *key)
 Returns the value string for a given option in the properties object. More...
 
int ConversionProperties_hasOption (const ConversionProperties_t *cp, const char *key)
 Checks whether the given properties structure has an option for the given key. More...
 
int ConversionProperties_hasTargetNamespaces (const ConversionProperties_t *cp)
 Tests whether the given conversion properties has a target namespace set. More...
 
void ConversionProperties_removeOption (ConversionProperties_t *cp, const char *key)
 Removes the ConversionOption with the given key from the properties. More...
 
void ConversionProperties_setBoolValue (ConversionProperties_t *cp, const char *key, int value)
 Sets the value of the option with given key to the given boolean value. More...
 
void ConversionProperties_setDoubleValue (ConversionProperties_t *cp, const char *key, double value)
 Sets the value of the option with given key to the given double value. More...
 
void ConversionProperties_setFloatValue (ConversionProperties_t *cp, const char *key, float value)
 Sets the value of the option with given key to the given float value. More...
 
void ConversionProperties_setIntValue (ConversionProperties_t *cp, const char *key, int value)
 Sets the value of the option with given key to the given int value. More...
 
void ConversionProperties_setTargetNamespaces (ConversionProperties_t *cp, SBMLNamespaces_t *sbmlns)
 Sets the target namespace. More...
 
void ConversionProperties_setValue (ConversionProperties_t *cp, const char *key, const char *value)
 Sets the value of the option with given key to the given value. More...
 

Function Documentation

void ConversionProperties_addOption ( ConversionProperties_t cp,
const ConversionOption_t option 
)

Adds a copy of the given ConversionOption structure to the properties.

Parameters
cpthe conversion properties
optionthe option to add
void ConversionProperties_addOptionWithKey ( ConversionProperties_t cp,
const char *  key 
)

Adds a new ConversionOption structure with the given key to the properties.

Parameters
cpthe conversion properties
keythe key for the new option
ConversionProperties_t* ConversionProperties_clone ( const ConversionProperties_t cp)

Creates and returns a deep copy of the given ConversionProperties object.

Parameters
cpthe conversion properties to clone
Returns
a (deep) copy of this ConversionProperties object.
ConversionProperties_t* ConversionProperties_create ( )

creates a new conversion properties structure (without namespace)

ConversionProperties_t* ConversionProperties_createWithSBMLNamespace ( SBMLNamespaces_t sbmlns)

creates a new conversion properties structure with a specific SBML target namespace.

Parameters
sbmlnsthe target namespace to convert to
int ConversionProperties_getBoolValue ( const ConversionProperties_t cp,
const char *  key 
)

Returns the value as boolean for a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the boolean value of the option with the given key to be freed by the caller, or NULL.
char* ConversionProperties_getDescription ( const ConversionProperties_t cp,
const char *  key 
)

Returns the description string for a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the description text of the option with the given key to be freed by the caller.
double ConversionProperties_getDoubleValue ( const ConversionProperties_t cp,
const char *  key 
)

Returns the value as double for a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the double value of the option with the given key to be freed by the caller, or NaN.
float ConversionProperties_getFloatValue ( const ConversionProperties_t cp,
const char *  key 
)

Returns the value as float for a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the float value of the option with the given key to be freed by the caller, or NaN.
int ConversionProperties_getIntValue ( const ConversionProperties_t cp,
const char *  key 
)

Returns the value as integer for a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the integer value of the option with the given key to be freed by the caller, or -1.
const ConversionOption_t* ConversionProperties_getOption ( const ConversionProperties_t cp,
const char *  key 
)

Returns the ConversionOption object for a given key.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the option with the given key, or NULL.
const SBMLNamespaces_t* ConversionProperties_getTargetNamespaces ( const ConversionProperties_t cp)

Returns the current target SBML namespace of the conversion properties.

Parameters
cpthe conversion properties
Returns
the SBMLNamepaces object expressing the target namespace, or NULL.
ConversionOptionType_t ConversionProperties_getType ( const ConversionProperties_t cp,
const char *  key 
)

Returns the type of a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the type of the option with the given key.
char* ConversionProperties_getValue ( const ConversionProperties_t cp,
const char *  key 
)

Returns the value string for a given option in the properties object.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
the string value of the option with the given key to be freed by the caller, or NULL.
int ConversionProperties_hasOption ( const ConversionProperties_t cp,
const char *  key 
)

Checks whether the given properties structure has an option for the given key.

Parameters
cpthe conversion properties
keythe key for the option.
Returns
1 if the option exists, 0 otherwise.
int ConversionProperties_hasTargetNamespaces ( const ConversionProperties_t cp)

Tests whether the given conversion properties has a target namespace set.

Parameters
cpthe conversion properties
Returns
1 if the target namespace has been set, 0 otherwise.
void ConversionProperties_removeOption ( ConversionProperties_t cp,
const char *  key 
)

Removes the ConversionOption with the given key from the properties.

Parameters
cpthe conversion properties
keythe key for the option to remove
void ConversionProperties_setBoolValue ( ConversionProperties_t cp,
const char *  key,
int  value 
)

Sets the value of the option with given key to the given boolean value.

Parameters
cpthe conversion properties
keythe key for the option.
valuethe new value for the option.
void ConversionProperties_setDoubleValue ( ConversionProperties_t cp,
const char *  key,
double  value 
)

Sets the value of the option with given key to the given double value.

Parameters
cpthe conversion properties
keythe key for the option.
valuethe new value for the option.
void ConversionProperties_setFloatValue ( ConversionProperties_t cp,
const char *  key,
float  value 
)

Sets the value of the option with given key to the given float value.

Parameters
cpthe conversion properties
keythe key for the option.
valuethe new value for the option.
void ConversionProperties_setIntValue ( ConversionProperties_t cp,
const char *  key,
int  value 
)

Sets the value of the option with given key to the given int value.

Parameters
cpthe conversion properties
keythe key for the option.
valuethe new value for the option.
void ConversionProperties_setTargetNamespaces ( ConversionProperties_t cp,
SBMLNamespaces_t sbmlns 
)

Sets the target namespace.

Parameters
cpthe conversion properties
sbmlnsthe target namespace to use.
void ConversionProperties_setValue ( ConversionProperties_t cp,
const char *  key,
const char *  value 
)

Sets the value of the option with given key to the given value.

Parameters
cpthe conversion properties
keythe key for the option.
valuethe new value for the option.