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...
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.
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
-
list | A Handle to a Property with type listOfProperty |
propertyHandle | Handle to the Property to add to the list(see createProperty) |
- Returns
- Returns a Boolean indicating success
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
-
parasHandle | Handle 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
-
name | The properties name as a string |
the_type | The properties type as string. Possible values: 'bool', 'int', 'double', 'string', and 'listOfProperties' |
hint | The properties hint as a string. |
value | This 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
")
3 propertyHandle = telPlugins.createProperty ("k1",
"double",
"A rate constant", 0.3)
def python.telplugins_c_api.freeProperty |
( |
|
propertyHandle) | |
|
Free memory for a Property.
- Parameters
-
propertyHandle | Handle 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
-
propertyHandle | to 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
-
propertyHandle | to 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
-
paraListHandle | Handle 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
-
propertyHandle | to 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
-
pluginHandle | Handle 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
-
propertyHandle | to 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
-
propertyHandle | Handle 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
-
paraListHandle | Handle 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
-
pluginHandle | Handle 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
-
pluginHandle | Handle 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
-
pluginHandle | Handle to a plugin |
propertyName | Name 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
-
propertyHandle | A 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
-
propertyHandle | Handle to a Property instance |
descr | String 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
-
propertyHandle | to 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
-
propertyHandle | Handle 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
-
propertyHandle | to 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
-
propertyHandle | to 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
-
propertyHandle | A 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
-
propertyHandle | to 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
-
propertyHandle | to 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
-
propertyHandle | to 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
-
propertyHandle | A 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
-
propertyHandle | to a property instance |
value | to 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
-
propertyHandle | Is a property instance |
value | to assign to the property. |
- Returns
- Returns true if successful, false otherwise
def python.telplugins_c_api.setIntProperty |
( |
|
propertyHandle, |
|
|
|
value |
|
) |
| |
Set an integer property.
- Parameters
-
propertyHandle | to a property instance |
value | to assign to the property. |
- Returns
- Returns true if successful, false otherwise
def python.telplugins_c_api.setListProperty |
( |
|
propertyHandle, |
|
|
|
value |
|
) |
| |
Set a list Property.
- Parameters
-
propertyHandle | to a Property instance |
value | Value 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
-
pluginHandle | Handle to a plugin |
propertyName | Name of property |
propertyValue | Value of property |
- Returns
- true if succesful, false otherwise
def python.telplugins_c_api.setProperty |
( |
|
propertyHandle, |
|
|
|
paraValue |
|
) |
| |
Set the value of a property.
- Parameters
-
property | handle Handle to a property |
paraValue | Value of property |
- Returns
- true if successful, false otherwise
def python.telplugins_c_api.setPropertyByString |
( |
|
PropertyHandle, |
|
|
|
value |
|
) |
| |
Set a Property by a string.
- Parameters
-
propertyHandle | to a Property instance |
value | Pointer 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
-
propertyHandle | Handle to a Property instance |
descr | String 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
-
propertyHandle | Handle to a Property instance |
descr | String holding the hint text |
- Returns
- Returns true if successful, false otherwise
def python.telplugins_c_api.setStringProperty |
( |
|
propertyHandle, |
|
|
|
value |
|
) |
| |
Set a string property.
- Parameters
-
propertyHandle | Handle to a Property instance |
value | Value 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
-
propertyHandle | Handle to a Property instance |
value | Value to assign to the property (must be a handle to telluriumData. |
- Returns
- Returns true if successful, false otherwise