Apama  9.10.0.4.289795
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
AP_PluginType_Functions Struct Reference

AP_Type function API. More...

#include <correlator_plugin.h>

Public Member Functions

 AP_TypeDiscriminator (AP_PLUGIN_CALL *getDiscriminator)(const AP_PluginType *obj)
 Return the type contained in this object. More...
 
AP_PluginChunk *AP_PLUGIN_CALL * getChunkValue (const AP_PluginType *obj)
 Get the chunk value of the object. More...
 
 void (AP_PLUGIN_CALL *setChunkValue)(const AP_PluginType *obj
 Set the chunk value of the object. More...
 
 AP_int64 (AP_PLUGIN_CALL *getIntegerValue)(const AP_PluginType *obj)
 Get the integer value of the object. More...
 
 void (AP_PLUGIN_CALL *setIntegerValue)(AP_PluginType *obj
 Set the integer value of the object. More...
 
 AP_float64 (AP_PLUGIN_CALL *getFloatValue)(const AP_PluginType *obj)
 Get the float value of the object. More...
 
 void (AP_PLUGIN_CALL *setFloatValue)(AP_PluginType *obj
 Set the float value of the object. More...
 
 AP_bool (AP_PLUGIN_CALL *getBooleanValue)(const AP_PluginType *obj)
 Get the boolean value of the object. More...
 
 void (AP_PLUGIN_CALL *setBooleanValue)(AP_PluginType *obj
 Set the boolean value of the object. More...
 
const AP_char8 *AP_PLUGIN_CALL * getStringValue (const AP_PluginType *obj)
 Get the string value of the object. More...
 
 void (AP_PLUGIN_CALL *setStringValue)(AP_PluginType *obj
 Set the string value of the object. More...
 
 AP_uint32 (AP_PLUGIN_CALL *getSequenceLength)(const AP_PluginType *obj)
 Get the number of elements in a sequence object. More...
 
 void (AP_PLUGIN_CALL *setSequenceLength)(const AP_PluginType *obj
 Set the length of a sequence object. More...
 
 AP_TypeDiscriminator (AP_PLUGIN_CALL *getSequenceType)(const AP_PluginType *obj)
 Get the element type of a sequence object. More...
 
 void (AP_PLUGIN_CALL *createSequence)(const AP_PluginType *obj
 Take an uninitialised sequence object and create an empty sequence with the indicated member type. More...
 
AP_PluginType *AP_PLUGIN_CALL * getSequenceElement (const AP_PluginType *obj, AP_uint32 index)
 Get a pointer to a single sequence element. More...
 
 void (AP_PLUGIN_CALL *copyFrom)(const AP_PluginType *obj
 Copy another AP_Type into this, regardless of type. More...
 
AP_PluginType *const
*AP_PLUGIN_CALL * 
getSequenceElements (const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
 Generate an array of pointers to AP_Type objects, encapsulating elements [start..start+length-1] of the sequence object. More...
 
 void (AP_PLUGIN_CALL *releaseSequenceElements)(const AP_PluginType *obj)
 Free the resources allocated by all preceding calls to sequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects. More...
 
AP_PluginChunk *const
*AP_PLUGIN_CALL * 
getChunkSequenceElements (const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
 Generate an array of pointers to chunks encapsulating elements [start..start+length-1] of the sequence object. More...
 
 void (AP_PLUGIN_CALL *releaseChunkSequenceElements)(const AP_PluginType *obj)
 Free the resources allocated by all preceding calls to chunkSequenceElements(). More...
 
AP_int64 *AP_PLUGIN_CALL * getIntegerSequenceElements (const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
 Generate an array of integers encapsulating elements [start..start+length-1] of the sequence object. More...
 
 void (AP_PLUGIN_CALL *releaseIntegerSequenceElements)(const AP_PluginType *obj)
 Free the resources allocated by all preceding calls to integerSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects. More...
 
AP_float64 *AP_PLUGIN_CALL * getFloatSequenceElements (const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
 Generate an array of floats encapsulating elements [start..start+length-1] of the sequence object. More...
 
 void (AP_PLUGIN_CALL *releaseFloatSequenceElements)(const AP_PluginType *obj)
 Free the resources allocated by all preceding calls to floatSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects. More...
 
AP_bool *AP_PLUGIN_CALL * getBooleanSequenceElements (const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
 Generate an array of booleans encapsulating elements [start..start+length-1] of the sequence object. More...
 
 void (AP_PLUGIN_CALL *releaseBooleanSequenceElements)(const AP_PluginType *obj)
 Free the resources allocated by all preceding calls to booleanSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects. More...
 
const AP_char8 **AP_PLUGIN_CALL * getStringSequenceElements (const AP_PluginType *obj, AP_uint32 start, AP_uint32 length)
 Generate an array of string pointers encapsulating elements [start..start+length-1] of the sequence object. More...
 
 void (AP_PLUGIN_CALL *releaseStringSequenceElements)(const AP_PluginType *obj)
 Free the resources allocated by all preceding calls to stringSequenceElements() and copies any changes made to the sequence elements to the underlying MonitorScript objects. More...
 

Detailed Description

AP_Type function API.

Member Function Documentation

AP_PluginType_Functions::AP_bool ( AP_PLUGIN_CALL *  getBooleanValue) const

Get the boolean value of the object.

AP_PluginType_Functions::AP_float64 ( AP_PLUGIN_CALL *  getFloatValue) const

Get the float value of the object.

AP_PluginType_Functions::AP_int64 ( AP_PLUGIN_CALL *  getIntegerValue) const

Get the integer value of the object.

AP_PluginType_Functions::AP_TypeDiscriminator ( AP_PLUGIN_CALL *  getDiscriminator) const

Return the type contained in this object.

AP_PluginType_Functions::AP_TypeDiscriminator ( AP_PLUGIN_CALL *  getSequenceType) const

Get the element type of a sequence object.

AP_PluginType_Functions::AP_uint32 ( AP_PLUGIN_CALL *  getSequenceLength) const

Get the number of elements in a sequence object.

AP_bool* AP_PLUGIN_CALL* AP_PluginType_Functions::getBooleanSequenceElements ( const AP_PluginType obj,
AP_uint32  start,
AP_uint32  length 
)

Generate an array of booleans encapsulating elements [start..start+length-1] of the sequence object.

This may or may not require copying the original MonitorScript objects.

AP_PluginChunk* const* AP_PLUGIN_CALL* AP_PluginType_Functions::getChunkSequenceElements ( const AP_PluginType obj,
AP_uint32  start,
AP_uint32  length 
)

Generate an array of pointers to chunks encapsulating elements [start..start+length-1] of the sequence object.

This may or may not require copying the original MonitorScript objects.

Note that the AP_Chunk pointers cannot be modified via this call. Use sequenceElement(), visitSequenceElements() or sequenceElements() instead, being sure to free any AP_Chunk instances that are replaced.

AP_PluginChunk* AP_PLUGIN_CALL* AP_PluginType_Functions::getChunkValue ( const AP_PluginType obj)

Get the chunk value of the object.

AP_float64* AP_PLUGIN_CALL* AP_PluginType_Functions::getFloatSequenceElements ( const AP_PluginType obj,
AP_uint32  start,
AP_uint32  length 
)

Generate an array of floats encapsulating elements [start..start+length-1] of the sequence object.

This may or may not require copying the original MonitorScript objects.

AP_int64* AP_PLUGIN_CALL* AP_PluginType_Functions::getIntegerSequenceElements ( const AP_PluginType obj,
AP_uint32  start,
AP_uint32  length 
)

Generate an array of integers encapsulating elements [start..start+length-1] of the sequence object.

This may or may not require copying the original MonitorScript objects.

AP_PluginType* AP_PLUGIN_CALL* AP_PluginType_Functions::getSequenceElement ( const AP_PluginType obj,
AP_uint32  index 
)

Get a pointer to a single sequence element.

The element AP_Type remains usable until the sequence AP_Type is destroyed.

AP_PluginType* const* AP_PLUGIN_CALL* AP_PluginType_Functions::getSequenceElements ( const AP_PluginType obj,
AP_uint32  start,
AP_uint32  length 
)

Generate an array of pointers to AP_Type objects, encapsulating elements [start..start+length-1] of the sequence object.

This may or may not require copying the original MonitorScript objects.

const AP_char8** AP_PLUGIN_CALL* AP_PluginType_Functions::getStringSequenceElements ( const AP_PluginType obj,
AP_uint32  start,
AP_uint32  length 
)

Generate an array of string pointers encapsulating elements [start..start+length-1] of the sequence object.

This may or may not require copying the original MonitorScript objects. Strings pointed to by this sequence are only valid for the lifetime of a call into the plugin.

const AP_char8* AP_PLUGIN_CALL* AP_PluginType_Functions::getStringValue ( const AP_PluginType obj)

Get the string value of the object.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  setChunkValue) const

Set the chunk value of the object.

The correlator takes ownership of the new AP_PluginChunk; it should not be deleted by the plugin.

The new pointer may be null.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  setIntegerValue)

Set the integer value of the object.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  setFloatValue)

Set the float value of the object.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  setBooleanValue)

Set the boolean value of the object.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  setStringValue)

Set the string value of the object.

Note that this is only possible on sequence elements and return values, not arguments (which are const)

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  setSequenceLength) const

Set the length of a sequence object.

Increasing the length will populate the sequence with default-initialised objects. Decreasing the length will remove items from the end.

You are not permitted to call setSequenceLength after calling sequenceElements without releasing the elements. If you call setSequenceLength any references returned from sequenceElement or operator[] are invalid and may not be used.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  createSequence) const

Take an uninitialised sequence object and create an empty sequence with the indicated member type.

Member type can only be primitives, string or chunk.

Typically used for return values from functions.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  copyFrom) const

Copy another AP_Type into this, regardless of type.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  releaseSequenceElements) const

Free the resources allocated by all preceding calls to sequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects.

Any arrays previously returned by sequenceElements() immediately become invalid. This function is automatically called when a sequence AP_Type is destroyed, but can be invoked explicitly by a plugin to copy changes back during a long-running computation.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  releaseChunkSequenceElements) const

Free the resources allocated by all preceding calls to chunkSequenceElements().

Arrays previously returned by chunkSequenceElements() immediately become invalid. This function is automatically called when a sequence AP_Type is destroyed, but can be invoked explicitly by a plugin during a long-running computation.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  releaseIntegerSequenceElements) const

Free the resources allocated by all preceding calls to integerSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects.

Arrays previously returned by integerSequenceElements() immediately become invalid. This function is automatically called when a sequence AP_Type is destroyed, but can be invoked explicitly by a plugin to copy changes back during a long-running computation.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  releaseFloatSequenceElements) const

Free the resources allocated by all preceding calls to floatSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects.

Arrays previously returned by floatSequenceElements() immediately become invalid. This function is automatically called when a sequence AP_Type is destroyed, but can be invoked explicitly by a plugin to copy changes back during a long-running computation.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  releaseBooleanSequenceElements) const

Free the resources allocated by all preceding calls to booleanSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying MonitorScript objects.

Arrays previously returned by booleanSequenceElements() immediately become invalid. This function is automatically called when a sequence AP_Type is destroyed, but can be invoked explicitly by a plugin to copy changes back during a long-running computation.

AP_PluginType_Functions::void ( AP_PLUGIN_CALL *  releaseStringSequenceElements) const

Free the resources allocated by all preceding calls to stringSequenceElements() and copies any changes made to the sequence elements to the underlying MonitorScript objects.

Arrays previously returned by stringSequenceElements() immediately become invalid. This function is automatically called when a sequence AP_Type is destroyed, but can be invoked explicitly by a plugin to copy changes back during a long-running computation.

Note that string sequence element arrays do not own the strings they reference and will never delete a string the plugin has placed in the array - if the plugin has set a value, it must delete that string (and it cannot use the value in the array returned from stringSequenceElement

  • plugins will need to keep another pointer to any new strings they create.

The documentation for this struct was generated from the following file: