{core}
A single configuration setting for an SBML converter.
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, and within such objects, individual options are encapsulated using ConversionOption objects.
A ConversionOption object consists of four parts:
- A key, acting as the name of the option.
- A value of this option.
- A type for the value; the type code is chosen from a set of integer constants whose names all begin with the prefix
CNV_TYPE_
. (See the separate subsection below for more information.)
- A description consisting of a text string that describes the option in some way.
There are no constraints on the values of keys or descriptions; authors of SBML converters are free to choose them as they see fit.
Conversion option data types
An option in ConversionOption 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 a set of constants whose symbol names begin with the prefix CNV_TYPE_
. The following are the possible values:
|
virtual ConversionOption * | clone () const |
| Creates and returns a deep copy of this ConversionOption object. More...
|
|
| ConversionOption (const std::string &key, const std::string &value="", ConversionOptionType_t type=CNV_TYPE_STRING, const std::string &description="") |
| Creates a new ConversionOption. More...
|
|
| ConversionOption (const std::string &key, const char *value, const std::string &description="") |
| Creates a new ConversionOption specialized for string-type options. More...
|
|
| ConversionOption (const std::string &key, bool value, const std::string &description="") |
| Creates a new ConversionOption specialized for Boolean-type options. More...
|
|
| ConversionOption (const std::string &key, double value, const std::string &description="") |
| Creates a new ConversionOption specialized for double-type options. More...
|
|
| ConversionOption (const std::string &key, float value, const std::string &description="") |
| Creates a new ConversionOption specialized for float-type options. More...
|
|
| ConversionOption (const std::string &key, int value, const std::string &description="") |
| Creates a new ConversionOption specialized for integer-type options. More...
|
|
| ConversionOption (const ConversionOption &orig) |
| Copy constructor; creates a copy of an ConversionOption object. More...
|
|
virtual bool | getBoolValue () const |
| Returns the value of this option as a Boolean. More...
|
|
const std::string & | getDescription () const |
| Returns the description string for this option. More...
|
|
virtual double | getDoubleValue () const |
| Returns the value of this option as a double . More...
|
|
virtual float | getFloatValue () const |
| Returns the value of this option as a float . More...
|
|
virtual int | getIntValue () const |
| Returns the value of this option as an integer . More...
|
|
const std::string & | getKey () const |
| Returns the key for this option. More...
|
|
ConversionOptionType_t | getType () const |
| Returns the type of this option. More...
|
|
const std::string & | getValue () const |
| Returns the value of this option. More...
|
|
ConversionOption & | operator= (const ConversionOption &rhs) |
| Assignment operator for ConversionOption. More...
|
|
virtual void | setBoolValue (bool value) |
| Set the value of this option to a given Boolean value. More...
|
|
void | setDescription (const std::string &description) |
| Sets the description text for this option. More...
|
|
virtual void | setDoubleValue (double value) |
| Set the value of this option to a given double value. More...
|
|
virtual void | setFloatValue (float value) |
| Set the value of this option to a given float value. More...
|
|
virtual void | setIntValue (int value) |
| Set the value of this option to a given int value. More...
|
|
void | setKey (const std::string &key) |
| Sets the key for this option. More...
|
|
void | setType (ConversionOptionType_t type) |
| Sets the type of this option. More...
|
|
void | setValue (const std::string &value) |
| Sets the value for this option. More...
|
|
virtual | ~ConversionOption () |
| Destroys this object. More...
|
|