Apama  10.3.1.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_Type Class Referenceabstract

[DEPRECATED]
Type-safe encapsulation of an EPL object, for passing arguments and return values into and out of plugin functions. More...

#include <correlator_plugin.hpp>

Classes

class  ElementFn
 [DEPRECATED]
More...
 

Public Member Functions

virtual ~AP_Type ()=0
 
virtual AP_TypeDiscriminator discriminator () const =0
 
virtual void copyFrom (const AP_Type &other)=0
 
virtual AP_ChunkchunkValue () const =0
 
virtual AP_ChunkchunkValue (AP_Chunk *val) const =0
 
virtual int64 integerValue () const =0
 
virtual void integerValue (int64 val)=0
 
virtual float64 floatValue () const =0
 
virtual void floatValue (float64 val)=0
 
virtual AP_decimal decimalValue () const =0
 
virtual void decimalValue (AP_decimal val)=0
 
virtual bool booleanValue () const =0
 
virtual void booleanValue (bool val)=0
 
virtual const char8 * stringValue () const =0
 
virtual void stringValue (const char8 *val)=0
 
virtual size_t sequenceLength () const =0
 
virtual void setSequenceLength (size_t length) const =0
 
virtual void createSequence (AP_TypeDiscriminator inner)=0
 
virtual AP_TypeDiscriminator sequenceType () const =0
 
virtual AP_TypesequenceElement (size_t index) const =0
 
template<typename FN >
void visitSequenceElements (const FN &fn, size_t start=0, size_t length=size_t(-1)) const
 
virtual AP_Type *const * sequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseSequenceElements () const =0
 
virtual AP_Chunk *const * chunkSequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseChunkSequenceElements () const =0
 
virtual int64 * integerSequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseIntegerSequenceElements () const =0
 
virtual float64 * floatSequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseFloatSequenceElements () const =0
 
virtual AP_decimal * decimalSequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseDecimalSequenceElements () const =0
 
virtual bool * booleanSequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseBooleanSequenceElements () const =0
 
virtual const char8 ** stringSequenceElements (size_t start=0, size_t length=size_t(-1)) const =0
 
virtual void releaseStringSequenceElements () const =0
 
 operator AP_Chunk * () const
 
AP_Typeoperator= (AP_Chunk *val)
 
 operator int64 () const
 
AP_Typeoperator= (int64 val)
 
 operator float64 () const
 
AP_Typeoperator= (float64 val)
 
 operator AP_decimal () const
 
AP_Typeoperator= (AP_decimal val)
 
 operator bool () const
 
AP_Typeoperator= (bool val)
 
 operator const char8 * () const
 
AP_Typeoperator= (const char8 *val)
 
AP_Typeoperator[] (size_t index) const
 
AP_Typeoperator= (const AP_Type &other)
 

Protected Member Functions

virtual void visitSequenceElementsImpl (const ElementFn &, size_t start, size_t length) const =0
 

Detailed Description

[DEPRECATED]
Type-safe encapsulation of an EPL object, for passing arguments and return values into and out of plugin functions.

Note that the implementation of the AP_Type member functions is internal to the Engine. One consequence of this is that plugins cannot create a useful instance of this class themselves; the only valid AP_Type objects are those passed in to a plugin function by the Engine.

AP_Type is a "smart union" object – each instance holds a single value of one of the supported types and only allows access to data of that type.

Deprecated:
This class has been deprecated.

Constructor & Destructor Documentation

virtual AP_Type::~AP_Type ( )
pure virtual
Deprecated:
Destructor

Member Function Documentation

virtual bool* AP_Type::booleanSequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
Generate an array of booleans encapsulating elements [start..start+length-1] of the sequence object.

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

virtual bool AP_Type::booleanValue ( ) const
pure virtual
Deprecated:
Get the boolean value of the object
virtual void AP_Type::booleanValue ( bool  val)
pure virtual
Deprecated:
Set the boolean value of the object
virtual AP_Chunk* const* AP_Type::chunkSequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
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 EPL 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.

virtual AP_Chunk* AP_Type::chunkValue ( ) const
pure virtual
Deprecated:
Get the chunk value of the object
virtual AP_Chunk* AP_Type::chunkValue ( AP_Chunk val) const
pure virtual
Deprecated:
Set the chunk value of the object.

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

The correlator releases ownership of the old AP_Chunk and returns it to the plug-in for disposal.

The old pointer, or new, or both, may be null.

virtual void AP_Type::copyFrom ( const AP_Type other)
pure virtual
Deprecated:
Copy another AP_Type into this, regardless of type
virtual void AP_Type::createSequence ( AP_TypeDiscriminator  inner)
pure virtual
Deprecated:
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.

virtual AP_decimal* AP_Type::decimalSequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
Generate an array of decimals encapsulating elements [start..start+length-1] of the sequence object.

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

virtual AP_decimal AP_Type::decimalValue ( ) const
pure virtual
Deprecated:
Get the decimal value of the object
virtual void AP_Type::decimalValue ( AP_decimal  val)
pure virtual
Deprecated:
Set the decimal value of the object
virtual AP_TypeDiscriminator AP_Type::discriminator ( ) const
pure virtual
Deprecated:
Get the type of the encapsulated object
virtual float64* AP_Type::floatSequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
Generate an array of floats encapsulating elements [start..start+length-1] of the sequence object.

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

virtual float64 AP_Type::floatValue ( ) const
pure virtual
Deprecated:
Get the float value of the object
virtual void AP_Type::floatValue ( float64  val)
pure virtual
Deprecated:
Set the float value of the object
virtual int64* AP_Type::integerSequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
Generate an array of integers encapsulating elements [start..start+length-1] of the sequence object.

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

virtual int64 AP_Type::integerValue ( ) const
pure virtual
Deprecated:
Get the integer value of the object
virtual void AP_Type::integerValue ( int64  val)
pure virtual
Deprecated:
Set the integer value of the object
AP_Type::operator AP_Chunk * ( ) const
inline
Deprecated:
Operator to get chunk value from object
AP_Type::operator AP_decimal ( ) const
inline
Deprecated:
Operator to get decimal value from object
AP_Type::operator bool ( ) const
inline
Deprecated:
Operator to get boolean value from object
AP_Type::operator const char8 * ( ) const
inline
Deprecated:
Operator to get string value from object
AP_Type::operator float64 ( ) const
inline
Deprecated:
Operator to get float value from object
AP_Type::operator int64 ( ) const
inline
Deprecated:
Operator to get integer value from object
AP_Type& AP_Type::operator= ( AP_Chunk val)
inline
Deprecated:
Operator to assign chunk value to object
AP_Type& AP_Type::operator= ( int64  val)
inline
Deprecated:
Operator to assign integer value to object
AP_Type& AP_Type::operator= ( float64  val)
inline
Deprecated:
Operator to assign float value to object
AP_Type& AP_Type::operator= ( AP_decimal  val)
inline
Deprecated:
Operator to assign decimal value to object
AP_Type& AP_Type::operator= ( bool  val)
inline
Deprecated:
Operator to assign boolean value to object
AP_Type& AP_Type::operator= ( const char8 *  val)
inline
Deprecated:
Operator to assign string value to object
AP_Type& AP_Type::operator= ( const AP_Type other)
inline
Deprecated:
Copy assignment operator from another AP_Type
AP_Type& AP_Type::operator[] ( size_t  index) const
inline
Deprecated:
Operator to get sequence element of object
virtual void AP_Type::releaseBooleanSequenceElements ( ) const
pure virtual
Deprecated:
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 EPL 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.

virtual void AP_Type::releaseChunkSequenceElements ( ) const
pure virtual
Deprecated:
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.

virtual void AP_Type::releaseDecimalSequenceElements ( ) const
pure virtual
Deprecated:
Free the resources allocated by all preceding calls to decimalSequenceElements() and ensures that any changes made to the sequence elements are reflected in the underlying EPL objects.

Arrays previously returned by decimalSequenceElements() 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.

virtual void AP_Type::releaseFloatSequenceElements ( ) const
pure virtual
Deprecated:
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 EPL 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.

virtual void AP_Type::releaseIntegerSequenceElements ( ) const
pure virtual
Deprecated:
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 EPL 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.

virtual void AP_Type::releaseSequenceElements ( ) const
pure virtual
Deprecated:
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 EPL 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.

virtual void AP_Type::releaseStringSequenceElements ( ) const
pure virtual
Deprecated:
Free the resources allocated by all preceding calls to stringSequenceElements() and copies any changes made to the sequence elements to the underlying EPL 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.
virtual AP_Type& AP_Type::sequenceElement ( size_t  index) const
pure virtual
Deprecated:
Get a reference to a single sequence element.

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

virtual AP_Type* const* AP_Type::sequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
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 EPL objects.

virtual size_t AP_Type::sequenceLength ( ) const
pure virtual
Deprecated:
Get the number of elements in a sequence object
virtual AP_TypeDiscriminator AP_Type::sequenceType ( ) const
pure virtual
Deprecated:
Get the element type of a sequence object
virtual void AP_Type::setSequenceLength ( size_t  length) const
pure virtual
Deprecated:
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.

virtual const char8** AP_Type::stringSequenceElements ( size_t  start = 0,
size_t  length = size_t(-1) 
) const
pure virtual
Deprecated:
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 EPL objects. Strings pointed to by this sequence are only valid for the lifetime of a call into the plugin.

virtual const char8* AP_Type::stringValue ( ) const
pure virtual
Deprecated:
Get the string value of the object
virtual void AP_Type::stringValue ( const char8 *  val)
pure virtual
Deprecated:
Set the string value of the object.

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

template<typename FN >
void AP_Type::visitSequenceElements ( const FN &  fn,
size_t  start = 0,
size_t  length = size_t(-1) 
) const
inline
Deprecated:
Visit the specified elements of a sequence using the specified functor.

Although less convenient than other sequence element accessors, it is more efficient as it entails no memory allocation.

virtual void AP_Type::visitSequenceElementsImpl ( const ElementFn ,
size_t  start,
size_t  length 
) const
protectedpure virtual

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