Tellurium Plugins
Python ctypes wrapper documentation
 All Functions Variables Groups Pages
Functions
Plugin Properties

Plugins Property related functions The plugin system supports property objects, these objects contain a variety of information about a given property, these include: the name, value, type, hint, and a description. More...

Functions

def getPluginProperties
 Get a handle to the list of properties for a plugin. More...
 
def getListOfPluginPropertyNames
 Get a list of property names in a plugin. More...
 
def clearPropertyList
 Clear a list of properties. More...
 
def getNamesFromPropertyList
 If the property is a list, this method returns the list of property names in that list. More...
 
def getPluginPropertiesAsXML
 Get a the properties of a plugins in xml format. More...
 
def getFirstProperty
 Get the 'first' property handle to a property in a list of properties. More...
 
def getNextProperty
 Get the 'next' property handle to a property in a list of properties. More...
 
def getPluginProperty
 Get a property handle to a property given the name of the property. More...
 
def setPluginProperty
 Set the value of a PluginProperty. More...
 
def setProperty
 Set the value of a property. More...
 
def setPropertyDescription
 Set the description of a Property. More...
 
def getPropertyDescription
 Get the description of a Property. More...
 
def setPropertyHint
 Set the hint property of a Property. More...
 
def createProperty
 Create a Property of type "type" with a name and hint property Valid types include: 'bool', 'int', 'double', 'string', and 'listOfProperties'. More...
 
def freeProperty
 Free memory for a Property. More...
 
def addPropertyToList
 Add a Property to a list of Property. More...
 
def setPropertyByString
 Set a Property by a string. More...
 
def getPropertyInfo
 Get inforamtion on a Property. More...
 
def getPropertyValueAsString
 Get a Property value in the form of a string. More...
 
def getPropertyValueHandle
 Get a handle to a Property value. More...
 
def getPropertyName
 Get the name of a Property. More...
 
def getPropertyHint
 Get the hint text for a Property. More...
 
def getPropertyType
 Get the type of a property. More...
 
def getBoolProperty
 Get the Boolean value for a property. More...
 
def setBoolProperty
 Set a boolean property. More...
 
def getIntProperty
 Get the integer value for a property. More...
 
def setIntProperty
 Set an integer property. More...
 
def getDoubleProperty
 Get the double value for a property. More...
 
def setDoubleProperty
 Set the value for a double property. More...
 
def getStringProperty
 Get the string value for a property. More...
 
def setStringProperty
 Set a string property. More...
 
def getListProperty
 Get the list value for a property. More...
 
def setListProperty
 Set a list Property. More...
 
def getTelluriumDataProperty
 Get the value of a telluriumData property. More...
 
def setTelluriumDataProperty
 Set a telluriumData property. More...
 
def getProperty
 Get the value of a property. More...
 
def getPropertyValue
 Get the value of a property. More...
 

Detailed Description

Plugins Property related functions The plugin system supports property objects, these objects contain a variety of information about a given property, these include: the name, value, type, hint, and a description.

The following types are currently supported, Booleans, integers, doubles, strings, list of property objects and the roadRunner data array format. Properties can also be grouped into convenient categories which can be useful for GUI applications. Every plugin exposes as a set of properties than can be inspected and set by a host application. The list of plugin properties will be called the pluginProperties. Within the pluginProperties are individual property entries. As already aluded to, these property entries can store a variety of different data types, incuding additional lists of properties. Such lists are popoluated by creating new properties using the createProperty method and then added to the list using the addPropertyToList method. In the followng a propertyHandle points to a single property object.

Function Documentation

def python.telplugins_c_api.addPropertyToList (   propertyHandle,
  addMe 
)

Add a Property to a list of Property.

Some plugins may have Property that require list of Property to be specified. For example when deciding what kinetic Property to fit in a model, the list of kinetic Property can be pass to the plugin as a list. This method can be used to add the names of the kinetic Property to the list.

Parameters
listA Handle to a Property with type listOfProperty
propertyHandleHandle to the Property to add to the list(see createProperty)
Returns
Returns a Boolean indicating success
1 paraList = getPluginProperty(plHandle, "SpeciesList");
2 newProperty = createProperty("k1", "double", "A Hint", 0.2)
3 addPropertyToList(paraList, newProperty)

def python.telplugins_c_api.clearPropertyList (   propertyListHandle)

Clear a list of properties.

Some properties exposed by plugins are lists that can hold other properties. New property can be added to these lists. clearPropertyList can be used to clear the list is a new list needs to be constructed.

Parameters
parasHandleHandle to a list of properties
Returns
True or false, indicating result. The top level list of properties in a plugin can not be cleared.
def python.telplugins_c_api.createProperty (   name,
  the_type,
  hint = "",
  value = None 
)

Create a Property of type "type" with a name and hint property Valid types include: 'bool', 'int', 'double', 'string', and 'listOfProperties'.

Parameters
nameThe properties name as a string
the_typeThe properties type as string. Possible values: 'bool', 'int', 'double', 'string', and 'listOfProperties'
hintThe properties hint as a string.
valueThis is an optional argument to set the Property (supports int, double and string).
Returns
Returns a handle to a new Property, if succesful, None otherwise
1  propertyHandle = telPlugins.createProperty ("k1", string", "A message")
2 
3 propertyHandle = telPlugins.createProperty ("k1", "double", "A rate constant", 0.3)

def python.telplugins_c_api.freeProperty (   propertyHandle)

Free memory for a Property.

Parameters
propertyHandleHandle to a Property instance
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.getBoolProperty (   propertyHandle)

Get the Boolean value for a property.

Parameters
propertyHandleto a property instance
Returns
Returns a Boolean value. Throws an exception if the property type is not a Boolean
def python.telplugins_c_api.getDoubleProperty (   propertyHandle)

Get the double value for a property.

Parameters
propertyHandleto a property instance
Returns
Returns a double value. Throws an exception if the property type is not a double
def python.telplugins_c_api.getFirstProperty (   paraListHandle)

Get the 'first' property handle to a property in a list of properties.

Parameters
paraListHandleHandle to a propertyList
Returns
Returns a handle to a property. Returns None if not found
def python.telplugins_c_api.getIntProperty (   propertyHandle)

Get the integer value for a property.

Parameters
propertyHandleto a property instance
Returns
Returns an integer value. Throws an exception if the property type is not an integer
def python.telplugins_c_api.getListOfPluginPropertyNames (   pluginHandle)

Get a list of property names in a plugin.

Parameters
pluginHandleHandle to a plugin
Returns
Returns the netire list of top level property names, None otherwise
def python.telplugins_c_api.getListProperty (   propertyHandle)

Get the list value for a property.

Parameters
propertyHandleto a property instance
Returns
Returns a handle to a ListProperty. Throws an exception of the property type is not a list of properties
def python.telplugins_c_api.getNamesFromPropertyList (   propertyHandle)

If the property is a list, this method returns the list of property names in that list.

Parameters
propertyHandleHandle to a property
Returns
Returns names for all properties in the list
def python.telplugins_c_api.getNextProperty (   paraListHandle)

Get the 'next' property handle to a property in a list of properties.

Parameters
paraListHandleHandle to a propertyList
Returns
Returns a handle to a property. Returns None if not found
def python.telplugins_c_api.getPluginProperties (   pluginHandle)

Get a handle to the list of properties for a plugin.

Parameters
pluginHandleHandle to a plugin
Returns
Returns a handle to a list of Properties on success, None otherwise
def python.telplugins_c_api.getPluginPropertiesAsXML (   pluginHandle)

Get a the properties of a plugins in xml format.

Parameters
pluginHandleHandle to a plugin
Returns
Returns a string on success, None otherwise
def python.telplugins_c_api.getPluginProperty (   pluginHandle,
  propertyName 
)

Get a property handle to a property given the name of the property.

Parameters
pluginHandleHandle to a plugin
propertyNameName of the property
Returns
Returns a propertyHandle to a property. Returns None if not found
def python.telplugins_c_api.getProperty (   propertyHandle)

Get the value of a property.

Parameters
propertyHandleA Handle to a property
Returns
Returns the value of the property if succesful, None otherwise
Todo:
rename to getPropertyValue (?)
def python.telplugins_c_api.getPropertyDescription (   propertyHandle)

Get the description of a Property.

Parameters
propertyHandleHandle to a Property instance
descrString holding the description
Returns
Returns the description if successful, None otherwise
def python.telplugins_c_api.getPropertyHint (   propertyHandle)

Get the hint text for a Property.

Parameters
propertyHandleto a Property instance
Returns
Returns the hint value for a Property if successful, None otherwise
def python.telplugins_c_api.getPropertyInfo (   propertyHandle)

Get inforamtion on a Property.

Parameters
propertyHandleHandle to a Property instance
Returns
Returns informational text about the Property if successful, None otherwise
def python.telplugins_c_api.getPropertyName (   propertyHandle)

Get the name of a Property.

Parameters
propertyHandleto a Property instance
Returns
Returns the Properties name if successful, None otherwise
def python.telplugins_c_api.getPropertyType (   propertyHandle)

Get the type of a property.

Parameters
propertyHandleto a Property instance
Returns
Returns the Properties type as a string if successful, None otherwise
def python.telplugins_c_api.getPropertyValue (   propertyHandle)

Get the value of a property.

Parameters
propertyHandleA Handle to a property
Returns
Returns the value of the property if succesful, None otherwise
Note
Legacy function. Use getProperty() instead.
def python.telplugins_c_api.getPropertyValueAsString (   propertyHandle)

Get a Property value in the form of a string.

Parameters
propertyHandleto a Property instance
Returns
Returns the Properties value if successful, None otherwise
def python.telplugins_c_api.getPropertyValueHandle (   propertyHandle)

Get a handle to a Property value.

Such properties could be any type, including a list of Properties. Use getlistProperty(propertyaHandle) instead.

Parameters
propertyHandleto a Property instance
Returns
Returns a Handle to the property value if successful, None otherwise
1 propertyHandle = telPlugins.getPropertyValueHandle (prophandle)

def python.telplugins_c_api.getStringProperty (   propertyHandle)

Get the string value for a property.

Parameters
propertyHandleto a property instance
Returns
Returns a string value. Throws an exception if the property type is not a string
def python.telplugins_c_api.getTelluriumDataProperty (   propertyHandle)

Get the value of a telluriumData property.

Parameters
propertyHandleA Handle to a property
Returns
Returns the value of the property if succesful, None otherwise
def python.telplugins_c_api.setBoolProperty (   propertyHandle,
  value 
)

Set a boolean property.

Parameters
propertyHandleto a property instance
valueto assign to the property.
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setDoubleProperty (   propertyHandle,
  value 
)

Set the value for a double property.

Parameters
propertyHandleIs a property instance
valueto assign to the property.
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setIntProperty (   propertyHandle,
  value 
)

Set an integer property.

Parameters
propertyHandleto a property instance
valueto assign to the property.
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setListProperty (   propertyHandle,
  value 
)

Set a list Property.

Parameters
propertyHandleto a Property instance
valueValue to assign to the property (must be a handle to a Property of listOfProperties.
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setPluginProperty (   pluginHandle,
  propertyName,
  propertyValue 
)

Set the value of a PluginProperty.

Parameters
pluginHandleHandle to a plugin
propertyNameName of property
propertyValueValue of property
Returns
true if succesful, false otherwise
def python.telplugins_c_api.setProperty (   propertyHandle,
  paraValue 
)

Set the value of a property.

Parameters
propertyhandle Handle to a property
paraValueValue of property
Returns
true if successful, false otherwise
def python.telplugins_c_api.setPropertyByString (   PropertyHandle,
  value 
)

Set a Property by a string.

Parameters
propertyHandleto a Property instance
valuePointer to string holding the value to assign to the Property, e.g. "0.01" to set a double to 0.01
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setPropertyDescription (   propertyHandle,
  descr 
)

Set the description of a Property.

Parameters
propertyHandleHandle to a Property instance
descrString holding the description
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setPropertyHint (   propertyHandle,
  descr 
)

Set the hint property of a Property.

Parameters
propertyHandleHandle to a Property instance
descrString holding the hint text
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setStringProperty (   propertyHandle,
  value 
)

Set a string property.

Parameters
propertyHandleHandle to a Property instance
valueValue to assign to the property.
Returns
Returns true if successful, false otherwise
def python.telplugins_c_api.setTelluriumDataProperty (   propertyHandle,
  value 
)

Set a telluriumData property.

Parameters
propertyHandleHandle to a Property instance
valueValue to assign to the property (must be a handle to telluriumData.
Returns
Returns true if successful, false otherwise