ConversionProperties Class Reference

List of all members.


Detailed Description

Class of object that encapsulates the properties of 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.

The properties of SBML converters are communicated using objects of class ConversionProperties, and within such objects, individual options are encapsulated using ConversionOption objects. The ConversionProperties class provides numerous methods for setting and getting options.

ConversionProperties objects are also used to determine the target SBML namespace when an SBML converter's behavior depends on the intended Level+Version combination of SBML. In addition, it is conceivable that conversions may be affected by SBML Level 3 packages being used by an SBML document. These, too, are communicated by the values of the SBML namespaces set on a ConversionProperties object.

See also:
ConversionOption
SBMLNamespaces

Public Member Functions

virtual void addOption (const ConversionOption &option)
 Adds a copy of the given option to this properties object.
virtual void addOption (std::string key, std::string value="", ConversionOptionType_t type=CNV_TYPE_STRING, std::string description="")
 Adds a new ConversionOption object with the given parameters.
virtual void addOption (std::string key, const char *value, std::string description="")
 Adds a new ConversionOption object with the given parameters.
virtual void addOption (std::string key, bool value, std::string description="")
 Adds a new ConversionOption object with the given parameters.
virtual void addOption (std::string key, double value, std::string description="")
 Adds a new ConversionOption object with the given parameters.
virtual void addOption (std::string key, float value, std::string description="")
 Adds a new ConversionOption object with the given parameters.
virtual void addOption (std::string key, int value, std::string description="")
 Adds a new ConversionOption object with the given parameters.
virtual ConversionProperties * clone () const
 Creates and returns a deep copy of this ConversionProperties object.
 ConversionProperties (SBMLNamespaces *targetNS=NULL)
 Constructor that initializes the conversion properties with a specific SBML target namespace.
 ConversionProperties (const ConversionProperties &obj)
 Copy constructor.
virtual bool getBoolValue (std::string key) const
 Returns the value of the given option as a Boolean.
virtual std::string getDescription (std::string key) const
 Returns the description string for a given option in this properties object.
virtual double getDoubleValue (std::string key) const
 Returns the value of the given option as a double.
virtual float getFloatValue (std::string key) const
 Returns the value of the given option as a float.
virtual int getIntValue (std::string key) const
 Returns the value of the given option as an integer.
virtual ConversionOption * getOption (std::string key) const
 Returns the ConversionOption object for a given key.
virtual SBMLNamespaces * getTargetNamespaces () const
 Returns the current target SBML namespace.
virtual ConversionOptionType_t getType (std::string key) const
 Returns the type of a given option in this properties object.
virtual std::string getValue (std::string key) const
 Returns the value of the given option as a string.
virtual bool hasOption (std::string key) const
 Returns true if this properties object contains an option with the given key.
virtual bool hasTargetNamespaces () const
 Returns true if the target SBML namespace has been set.
ConversionProperties & operator= (const ConversionProperties &)
 Assignment operator for conversion properties.
virtual ConversionOption * removeOption (std::string key)
 Removes the option with the given key from this properties object.
virtual void setBoolValue (std::string key, bool value)
 Sets the value of the given option to a Boolean.
virtual void setDoubleValue (std::string key, double value)
 Sets the value of the given option to a double.
virtual void setFloatValue (std::string key, float value)
 Sets the value of the given option to a float.
virtual void setIntValue (std::string key, int value)
 Sets the value of the given option to an integer.
virtual void setTargetNamespaces (SBMLNamespaces *targetNS)
 Sets the target namespace.
virtual void setValue (std::string key, std::string value)
 Sets the value of the given option to a string.
virtual ~ConversionProperties ()
 Destructor.

Constructor & Destructor Documentation

Constructor that initializes the conversion properties with a specific SBML target namespace.

Parameters:
targetNSthe target namespace to convert to

Member Function Documentation

void ConversionProperties::addOption ( const ConversionOption &  option) [virtual]

Adds a copy of the given option to this properties object.

Parameters:
optionthe option to add
void ConversionProperties::addOption ( std::string  key,
std::string  value = "",
ConversionOptionType_t  type = CNV_TYPE_STRING,
std::string  description = "" 
) [virtual]

Adds a new ConversionOption object with the given parameters.

Parameters:
keythe key for the new option
value(optional) the value of that option
type(optional) the type of the option
description(optional) the description for the option
void ConversionProperties::addOption ( std::string  key,
const char *  value,
std::string  description = "" 
) [virtual]

Adds a new ConversionOption object with the given parameters.

Parameters:
keythe key for the new option
valuethe string value of that option
description(optional) the description for the option
void ConversionProperties::addOption ( std::string  key,
bool  value,
std::string  description = "" 
) [virtual]

Adds a new ConversionOption object with the given parameters.

Parameters:
keythe key for the new option
valuethe boolean value of that option
description(optional) the description for the option
void ConversionProperties::addOption ( std::string  key,
double  value,
std::string  description = "" 
) [virtual]

Adds a new ConversionOption object with the given parameters.

Parameters:
keythe key for the new option
valuethe double value of that option
description(optional) the description for the option
void ConversionProperties::addOption ( std::string  key,
float  value,
std::string  description = "" 
) [virtual]

Adds a new ConversionOption object with the given parameters.

Parameters:
keythe key for the new option
valuethe float value of that option
description(optional) the description for the option
void ConversionProperties::addOption ( std::string  key,
int  value,
std::string  description = "" 
) [virtual]

Adds a new ConversionOption object with the given parameters.

Parameters:
keythe key for the new option
valuethe integer value of that option
description(optional) the description for the option

Creates and returns a deep copy of this ConversionProperties object.

Returns:
a (deep) copy of this ConversionProperties object.
bool ConversionProperties::getBoolValue ( std::string  key) const [virtual]

Returns the value of the given option as a Boolean.

Parameters:
keythe key for the option.
Returns:
the boolean value of the option with the given key.
std::string ConversionProperties::getDescription ( std::string  key) const [virtual]

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

Parameters:
keythe key for the option.
Returns:
the description text of the option with the given key.
double ConversionProperties::getDoubleValue ( std::string  key) const [virtual]

Returns the value of the given option as a double.

Parameters:
keythe key for the option.
Returns:
the double value of the option with the given key.
float ConversionProperties::getFloatValue ( std::string  key) const [virtual]

Returns the value of the given option as a float.

Parameters:
keythe key for the option.
Returns:
the float value of the option with the given key.
int ConversionProperties::getIntValue ( std::string  key) const [virtual]

Returns the value of the given option as an integer.

Parameters:
keythe key for the option.
Returns:
the int value of the option with the given key.
ConversionOption * ConversionProperties::getOption ( std::string  key) const [virtual]

Returns the ConversionOption object for a given key.

Parameters:
keythe key for the option.
Returns:
the option with the given key.

Returns the current target SBML namespace.

Returns:
the SBMLNamepaces object expressing the target namespace.
ConversionOptionType_t ConversionProperties::getType ( std::string  key) const [virtual]

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

Parameters:
keythe key for the option.
Returns:
the type of the option with the given key.
std::string ConversionProperties::getValue ( std::string  key) const [virtual]

Returns the value of the given option as a string.

Parameters:
keythe key for the option.
Returns:
the string value of the option with the given key.
bool ConversionProperties::hasOption ( std::string  key) const [virtual]

Returns true if this properties object contains an option with the given key.

Parameters:
keythe key of the option to find.
Returns:
true if an option with the given key exists in this properties object, false otherwise.

Returns true if the target SBML namespace has been set.

Returns:
true if the target namespace has been set, false otherwise.
ConversionProperties & ConversionProperties::operator= ( const ConversionProperties &  rhs)

Assignment operator for conversion properties.

ConversionOption * ConversionProperties::removeOption ( std::string  key) [virtual]

Removes the option with the given key from this properties object.

Parameters:
keythe key for the new option to remove
Returns:
the removed option
void ConversionProperties::setBoolValue ( std::string  key,
bool  value 
) [virtual]

Sets the value of the given option to a Boolean.

Parameters:
keythe key for the option.
valuethe new Boolean value.
void ConversionProperties::setDoubleValue ( std::string  key,
double  value 
) [virtual]

Sets the value of the given option to a double.

Parameters:
keythe key for the option.
valuethe new double value.
void ConversionProperties::setFloatValue ( std::string  key,
float  value 
) [virtual]

Sets the value of the given option to a float.

Parameters:
keythe key for the option.
valuethe new float value.
void ConversionProperties::setIntValue ( std::string  key,
int  value 
) [virtual]

Sets the value of the given option to an integer.

Parameters:
keythe key for the option.
valuethe new integer value.

Sets the target namespace.

Parameters:
targetNSthe target namespace to use.
void ConversionProperties::setValue ( std::string  key,
std::string  value 
) [virtual]

Sets the value of the given option to a string.

Parameters:
keythe key for the option
valuethe new value
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines