Tellurium Plugin C API  1.0.0
Plugin Framework for Tellurium
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
Plugin Properties

Plugins Property related functions. More...

Functions

TELHandle tpCreateProperty (const char *label, const char *type, const char *hint, void *value)
 Create a property of type "type". More...
 
TELHandle tpCreatePropertyList (void)
 Create a PropertyList, i.e. an object of type Properties. More...
 
bool tpFreeProperties (TELHandle propertiesH)
 Free a list of properties. More...
 
bool tpFreeProperty (TELHandle property)
 Free the memory created by a property. More...
 
bool tpAddPropertyToList (TELHandle handle, TELHandle property)
 Add a property to a properties container, from a property pointer. More...
 
bool tpSetPropertyByString (TELHandle handle, const char *value)
 Set a property value by a string. More...
 
bool tpGetBoolProperty (TELHandle handle, bool *value)
 Get a boolean property. More...
 
bool tpSetBoolProperty (TELHandle handle, bool value)
 Set a boolean property. More...
 
bool tpSetIntProperty (TELHandle handle, int value)
 Set an int property. More...
 
bool tpGetIntProperty (TELHandle handle, int *value)
 Get the value of an int property. More...
 
bool tpSetDoubleProperty (TELHandle handle, double value)
 Set a double property. More...
 
bool tpGetDoubleProperty (TELHandle handle, double *value)
 Get the value of a double property. More...
 
bool tpSetStringProperty (TELHandle handle, char *value)
 Set a string (char*) property. More...
 
bool tpGetStringProperty (TELHandle handle, const char *(*value))
 Get the value of a string (char*) property. More...
 
bool tpSetListProperty (TELHandle handle, void *value)
 Set a listOfProperties (Properties) property. More...
 
bool tpGetListProperty (TELHandle handle, void *value)
 Get the value of a listOfProperties (Properties) property. More...
 
bool tpSetTelluriumDataProperty (TELHandle handle, void *value)
 Set a telluriumDataProperty property. More...
 
bool tpGetTelluriumDataProperty (TELHandle handle, void *value)
 Get the value of a telluriumDataProperty property. More...
 
char * tpGetPropertyInfo (TELHandle handle)
 Get a property's info. More...
 
char * tpGetPropertyValueAsString (TELHandle handle)
 Get a property's value as char*. More...
 
void * tpGetPropertyValueHandle (TELHandle handle)
 Get a handle to a property's value. More...
 
char * tpGetPropertyName (TELHandle handle)
 Get a property's name. More...
 
char * tpGetPropertyHint (TELHandle handle)
 Get a property's hint. More...
 
bool tpSetPropertyHint (TELHandle handle, const char *value)
 Set a property's hint. More...
 
char * tpGetPropertyDescription (TELHandle handle)
 Get a property's description. More...
 
bool tpSetPropertyDescription (TELHandle handle, const char *value)
 Set a property's Description. More...
 
char * tpGetPropertyType (TELHandle handle)
 Get a property's type. More...
 
TELHandle tpGetFirstProperty (TELHandle handle)
 Get a property containers 'first' property. More...
 
TELHandle tpGetNextProperty (TELHandle handle)
 Get a property containers 'next' property. More...
 
TELHandle tpGetPreviousProperty (TELHandle handle)
 Get a property containers 'previous' property. More...
 
TELHandle tpGetCurrentProperty (TELHandle handle)
 Get a property containers 'current' property. More...
 

Detailed Description

Plugins Property related functions.

Function Documentation

bool tpAddPropertyToList ( TELHandle  handle,
TELHandle  property 
)

Add a property to a properties container, from a property pointer.

Parameters
handleHandle to a RoadRunner instance
propertyHandle to a roadrunner property
Returns
Returns a booelan indicating success
TELHandle tpCreateProperty ( const char *  label,
const char *  type,
const char *  hint,
void *  value 
)

Create a property of type "type".

Parameters
labelThe property's label as a string
typeThe property's type as string. Possible values can be 'double', 'int', 'char*' etc,
hintThe property's hint as string.
valueThe property's initial value casted to a (void*) pointer
Returns
Returns a handle to a new property, if succesful, NULL otherwise
TELHandle tpCreatePropertyList ( void  )

Create a PropertyList, i.e. an object of type Properties.

Returns
Returns a handle to a new PropertyList, if succesful, NULL otherwise
bool tpFreeProperties ( TELHandle  propertiesH)

Free a list of properties.

Parameters
propertiesHA handle a list of properties
Returns
Returns true if sucessful, false otherwise
bool tpFreeProperty ( TELHandle  property)

Free the memory created by a property.

Parameters
propertyA handle to the property
Returns
Returns true if sucessful, false otherwise
bool tpGetBoolProperty ( TELHandle  handle,
bool *  value 
)

Get a boolean property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
TELHandle tpGetCurrentProperty ( TELHandle  handle)

Get a property containers 'current' property.

Parameters
handleHandle to a Properties (container for properties) instance
Returns
Returns a handle to the 'current property', NULL if container is empty
Note
This function is typically used together with the getNextProperty, getPreviuosProperty and getFirstProperty, when iterating trough properties.
bool tpGetDoubleProperty ( TELHandle  handle,
double *  value 
)

Get the value of a double property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
TELHandle tpGetFirstProperty ( TELHandle  handle)

Get a property containers 'first' property.

Parameters
handleHandle to a Properties (container for properties) instance
Returns
Returns a handle to the 'first property', NULL if container is empty
Note
This function is typically used together with the getNextProperty, getPreviuosProperty and getCurrentProperty when iterating trough properties.
bool tpGetIntProperty ( TELHandle  handle,
int *  value 
)

Get the value of an int property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpGetListProperty ( TELHandle  handle,
void *  value 
)

Get the value of a listOfProperties (Properties) property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
TELHandle tpGetNextProperty ( TELHandle  handle)

Get a property containers 'next' property.

Parameters
handleHandle to a Properties (container for properties) instance
Returns
Returns a handle to the 'next property', NULL if unsucccesfull
Note
This function is typically used together with the getFirstProperty, getPreviuosProperty and getCurrentProperty when iterating trough properties. This function do not wrap around. This function move an internal Property iterator forward one step.
TELHandle tpGetPreviousProperty ( TELHandle  handle)

Get a property containers 'previous' property.

Parameters
handleHandle to a Properties (container for properties) instance
Returns
Returns a handle to the 'previous property', NULL if container is empty
Note
This function is typically used together with the getNextProperty, getNextProperty and getCurrentProperty when iterating trough properties. This function move an internal Property iterator back one step.
char* tpGetPropertyDescription ( TELHandle  handle)

Get a property's description.

Parameters
handleto a Property instance
Returns
Returns the property's description as a string sucessful, NULL otherwise
char* tpGetPropertyHint ( TELHandle  handle)

Get a property's hint.

Parameters
handleto a Property instance
Returns
Returns the property's hint if sucessful, NULL otherwise
char* tpGetPropertyInfo ( TELHandle  handle)

Get a property's info.

Parameters
handleHandle to a property instance
Returns
Returns informational text about the property if sucessful, NULL otherwise
char* tpGetPropertyName ( TELHandle  handle)

Get a property's name.

Parameters
handleto a Property instance
Returns
Returns the property's name if sucessful, NULL otherwise
char* tpGetPropertyType ( TELHandle  handle)

Get a property's type.

Parameters
handleHandle to a Property instance
Returns
Returns the property's type if sucessful, NULL otherwise
char* tpGetPropertyValueAsString ( TELHandle  handle)

Get a property's value as char*.

Parameters
handleto a Property instance
Returns
Returns the property's value if sucessful, NULL otherwise
void* tpGetPropertyValueHandle ( TELHandle  handle)

Get a handle to a property's value.

Parameters
handleto a Property instance
Returns
Returns a Handle to the property's value if sucessful, NULL otherwise
bool tpGetStringProperty ( TELHandle  handle,
const char **  value 
)

Get the value of a string (char*) property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpGetTelluriumDataProperty ( TELHandle  handle,
void *  value 
)

Get the value of a telluriumDataProperty property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpSetBoolProperty ( TELHandle  handle,
bool  value 
)

Set a boolean property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpSetDoubleProperty ( TELHandle  handle,
double  value 
)

Set a double property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpSetIntProperty ( TELHandle  handle,
int  value 
)

Set an int property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpSetListProperty ( TELHandle  handle,
void *  value 
)

Set a listOfProperties (Properties) property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpSetPropertyByString ( TELHandle  handle,
const char *  value 
)

Set a property value by a string.

Parameters
handleto 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 sucessful, false otherwise
bool tpSetPropertyDescription ( TELHandle  handle,
const char *  value 
)

Set a property's Description.

Parameters
handleto a Property instance
valueThe property description as a string
Returns
Returns true if sucessful, false otherwise
bool tpSetPropertyHint ( TELHandle  handle,
const char *  value 
)

Set a property's hint.

Parameters
handleto a Property instance
valueThe property hint as a string
Returns
Returns true if sucessful, false otherwise
bool tpSetStringProperty ( TELHandle  handle,
char *  value 
)

Set a string (char*) property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise
bool tpSetTelluriumDataProperty ( TELHandle  handle,
void *  value 
)

Set a telluriumDataProperty property.

Parameters
handleto a Property instance
valueto assign to the property.
Returns
Returns true if sucessful, false otherwise