libSBML Python API  5.10.0
 All Classes Namespaces Files Functions Variables Modules Pages
libsbml.ConversionOption Class Reference
Inheritance diagram for libsbml.ConversionOption:
[legend]

Detailed Description

{core}

Class of object that encapsulates a conversion option.

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; this is chosen from the enumeration type long; and
  • 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.

Rule types for SBML Level 1

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 the enumeration long. 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 float-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

def clone
 
def getBoolValue
 
def getDescription
 
def getDoubleValue
 
def getFloatValue
 
def getIntValue
 
def getKey
 
def getType
 
def getValue
 
def setBoolValue
 
def setDescription
 
def setDoubleValue
 
def setFloatValue
 
def setIntValue
 
def setKey
 
def setType
 
def setValue
 

Member Function Documentation

def libsbml.ConversionOption.clone (   self)

{core}

Class of object that encapsulates a conversion option.

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; this is chosen from the enumeration type long; and
  • 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.

Rule types for SBML Level 1

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 the enumeration long. 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 float-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 Python method signature(s):
clone(ConversionOption self)   ConversionOption

Creates and returns a deep copy of this ConversionOption object.

Returns
a (deep) copy of this ConversionOption object.
def libsbml.ConversionOption.getBoolValue (   self)

Python method signature(s):

getBoolValue(ConversionOption self)   bool

Returns the value of this option as a Boolean.

Returns
the value of this option.
def libsbml.ConversionOption.getDescription (   self)

Python method signature(s):

getDescription(ConversionOption self)   string

Returns the description string for this option.

Returns
the description of this option.
def libsbml.ConversionOption.getDoubleValue (   self)

Python method signature(s):

getDoubleValue(ConversionOption self)   float

Returns the value of this option as a float.

Returns
the value of this option.
def libsbml.ConversionOption.getFloatValue (   self)

Python method signature(s):

getFloatValue(ConversionOption self)   float

Returns the value of this option as a float.

Returns
the value of this option as a float
def libsbml.ConversionOption.getIntValue (   self)

Python method signature(s):

getIntValue(ConversionOption self)   int

Returns the value of this option as an integer.

Returns
the value of this option, as an int
def libsbml.ConversionOption.getKey (   self)

Python method signature(s):

getKey(ConversionOption self)   string

Returns the key for this option.

Returns
the key, as a string.
def libsbml.ConversionOption.getType (   self)

Python method signature(s):

getType(ConversionOption self)   long

Returns the type of this option

Returns
the type of this option.
def libsbml.ConversionOption.getValue (   self)

Python method signature(s):

getValue(ConversionOption self)   string

Returns the value of this option.

Returns
the value of this option, as a string.
def libsbml.ConversionOption.setBoolValue (   self,
  args 
)

Python method signature(s):

setBoolValue(ConversionOption self, 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
def libsbml.ConversionOption.setDescription (   self,
  args 
)

Python method signature(s):

setDescription(ConversionOption self, string description)

Sets the description text for this option.

Parameters
descriptionthe description to set for this option.
def libsbml.ConversionOption.setDoubleValue (   self,
  args 
)

Python method signature(s):

setDoubleValue(ConversionOption self, 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_DOUBLE.

Parameters
valuethe value to set
def libsbml.ConversionOption.setFloatValue (   self,
  args 
)

Python method signature(s):

setFloatValue(ConversionOption self, 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
def libsbml.ConversionOption.setIntValue (   self,
  args 
)

Python method signature(s):

setIntValue(ConversionOption self, 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
def libsbml.ConversionOption.setKey (   self,
  args 
)

Python method signature(s):

setKey(ConversionOption self, string key)

Sets the key for this option.

Parameters
keya string representing the key to set.
def libsbml.ConversionOption.setType (   self,
  args 
)

Python method signature(s):

setType(ConversionOption self, long type)

Sets the type of this option.

Parameters
typethe type value to use.
def libsbml.ConversionOption.setValue (   self,
  args 
)

Python method signature(s):

setValue(ConversionOption self, string value)

Sets the value for this option.

Parameters
valuethe value to set, as a string.