libSBML C# API  5.18.0
libsbmlcs.ConversionOption Class Reference
Inheritance diagram for libsbmlcs.ConversionOption:
[legend]

Detailed Description

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 objectconsists 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 constantswhose 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:

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.
See also
ConversionProperties

Public Member Functions

new ConversionOption clone ()
 Creates and returns a deep copy of this ConversionOption object. More...
 
 ConversionOption (string key, string value, int type, string description)
 Creates a new ConversionOption. More...
 
 ConversionOption (string key, string value, int type)
 Creates a new ConversionOption. More...
 
 ConversionOption (string key, string value)
 Creates a new ConversionOption. More...
 
 ConversionOption (string key)
 Creates a new ConversionOption. More...
 
 ConversionOption (string key, string value, string description)
 Creates a new ConversionOption specialized for string-type options. More...
 
 ConversionOption (string key, bool value, string description)
 Creates a new ConversionOption specialized for Boolean-type options. More...
 
 ConversionOption (string key, bool value)
 Creates a new ConversionOption specialized for Boolean-type options. More...
 
 ConversionOption (string key, double value, string description)
 Creates a new ConversionOption specialized for double-type options. More...
 
 ConversionOption (string key, double value)
 Creates a new ConversionOption specialized for double-type options. More...
 
 ConversionOption (string key, float value, string description)
 Creates a new ConversionOption specialized for float-type options. More...
 
 ConversionOption (string key, float value)
 Creates a new ConversionOption specialized for float-type options. More...
 
 ConversionOption (string key, int value, string description)
 Creates a new ConversionOption specialized for integer-type options. More...
 
 ConversionOption (string key, int value)
 Creates a new ConversionOption specialized for integer-type options. More...
 
 ConversionOption (ConversionOption orig)
 Copy constructor; creates a copy of an ConversionOption object. More...
 
virtual void Dispose ()
 
new bool getBoolValue ()
 Returns the value of this option as a Boolean. More...
 
string getDescription ()
 Returns the description string for this option. More...
 
new double getDoubleValue ()
 Returns the value of this option as a double. More...
 
new float getFloatValue ()
 Returns the value of this option as a float. More...
 
new int getIntValue ()
 Returns the value of this option as an integer. More...
 
string getKey ()
 Returns the key for this option. More...
 
int getType ()
 Returns the type of this option. More...
 
string getValue ()
 Returns the value of this option. More...
 
new void setBoolValue (bool value)
 Set the value of this option to a given Boolean value. More...
 
void setDescription (string description)
 Sets the description text for this option. More...
 
new void setDoubleValue (double value)
 Set the value of this option to a given double value. More...
 
new void setFloatValue (float value)
 Set the value of this option to a given float value. More...
 
new void setIntValue (int value)
 Set the value of this option to a given int value. More...
 
void setKey (string key)
 Sets the key for this option. More...
 
void setType (int type)
 Sets the type of this option. More...
 
void setValue (string value)
 Sets the value for this option. More...
 

Protected Attributes

bool swigCMemOwn
 

Constructor & Destructor Documentation

libsbmlcs.ConversionOption.ConversionOption ( string  key,
string  value,
int  type,
string  description 
)

Creates a new ConversionOption.

This is the general constructor, taking arguments for all aspects of an option. Other constructors exist with different arguments.

The conversion type argument value must be one of

Parameters
keythe key for this option.
valuean optional value for this option.
typethe type of this option.
descriptionthe description for this option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
string  value,
int  type 
)

Creates a new ConversionOption.

This is the general constructor, taking arguments for all aspects of an option. Other constructors exist with different arguments.

The conversion type argument value must be one of

Parameters
keythe key for this option.
valuean optional value for this option.
typethe type of this option.
descriptionthe description for this option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
string  value 
)

Creates a new ConversionOption.

This is the general constructor, taking arguments for all aspects of an option. Other constructors exist with different arguments.

The conversion type argument value must be one of

Parameters
keythe key for this option.
valuean optional value for this option.
typethe type of this option.
descriptionthe description for this option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key)

Creates a new ConversionOption.

This is the general constructor, taking arguments for all aspects of an option. Other constructors exist with different arguments.

The conversion type argument value must be one of

Parameters
keythe key for this option.
valuean optional value for this option.
typethe type of this option.
descriptionthe description for this option.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
string  value,
string  description 
)

Creates a new ConversionOption specialized for string-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
bool  value,
string  description 
)

Creates a new ConversionOption specialized for Boolean-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
bool  value 
)

Creates a new ConversionOption specialized for Boolean-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
double  value,
string  description 
)

Creates a new ConversionOption specialized for double-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
double  value 
)

Creates a new ConversionOption specialized for double-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
float  value,
string  description 
)

Creates a new ConversionOption specialized for float-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
float  value 
)

Creates a new ConversionOption specialized for float-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
int  value,
string  description 
)

Creates a new ConversionOption specialized for integer-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( string  key,
int  value 
)

Creates a new ConversionOption specialized for integer-type options.

Parameters
keythe key for this option.
valuethe value for this option.
descriptionan optional description.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.ConversionOption.ConversionOption ( ConversionOption  orig)

Copy constructor; creates a copy of an ConversionOption object.

Parameters
origthe ConversionOption object to copy.

Member Function Documentation

new ConversionOption libsbmlcs.ConversionOption.clone ( )

Creates and returns a deep copy of this ConversionOption object.

Returns
the (deep) copy of this ConversionOption object.
virtual void libsbmlcs.ConversionOption.Dispose ( )
virtual
new bool libsbmlcs.ConversionOption.getBoolValue ( )

Returns the value of this option as a Boolean.

Returns
the value of this option.
string libsbmlcs.ConversionOption.getDescription ( )

Returns the description string for this option.

Returns
the description of this option.
new double libsbmlcs.ConversionOption.getDoubleValue ( )

Returns the value of this option as a double.

Returns
the value of this option.
new float libsbmlcs.ConversionOption.getFloatValue ( )

Returns the value of this option as a float.

Returns
the value of this option as a float.
new int libsbmlcs.ConversionOption.getIntValue ( )

Returns the value of this option as an integer.

Returns
the value of this option, as an int.
string libsbmlcs.ConversionOption.getKey ( )

Returns the key for this option.

Returns
the key, as a string.
int libsbmlcs.ConversionOption.getType ( )

Returns the type of this option.

Returns
the type of this option.
string libsbmlcs.ConversionOption.getValue ( )

Returns the value of this option.

Returns
the value of this option, as a string.
new void libsbmlcs.ConversionOption.setBoolValue ( bool  value)

Set the value of this option to a given Boolean value.

Invoking this method will also set the type of the option to CNV_TYPE_BOOL.

Parameters
valuethe Boolean value to set.
void libsbmlcs.ConversionOption.setDescription ( string  description)

Sets the description text for this option.

Parameters
descriptionthe description to set for this option.
new void libsbmlcs.ConversionOption.setDoubleValue ( double  value)

Set the value of this option to a given double value.

Invoking this method will also set the type of the option to CNV_TYPE_DOUBLE.

Parameters
valuethe value to set.
new void libsbmlcs.ConversionOption.setFloatValue ( float  value)

Set the value of this option to a given float value.

Invoking this method will also set the type of the option to CNV_TYPE_SINGLE.

Parameters
valuethe value to set.
new void libsbmlcs.ConversionOption.setIntValue ( int  value)

Set the value of this option to a given int value.

Invoking this method will also set the type of the option to CNV_TYPE_INT.

Parameters
valuethe value to set.
void libsbmlcs.ConversionOption.setKey ( string  key)

Sets the key for this option.

Parameters
keya string representing the key to set.
void libsbmlcs.ConversionOption.setType ( int  type)

Sets the type of this option.

The conversion type argument value must be one of

Parameters
typethe type value to use.
void libsbmlcs.ConversionOption.setValue ( string  value)

Sets the value for this option.

Parameters
valuethe value to set, as a string.

Member Data Documentation

bool libsbmlcs.ConversionOption.swigCMemOwn
protected