Apama  10.15.3.4
AP_TimestampSet_Functions Struct Reference

AP_TimestampSet_Functions. More...

#include <AP_TimestampSet.h>

Public Attributes

void(* addNow )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)
 addNow More...
 
void(* addTime )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index, AP_TimestampSetTime time)
 addTime More...
 
void(* replace )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index, AP_TimestampSetTime newTime)
 replace More...
 
void(* replaceWithNow )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)
 replaceWithNow More...
 
AP_TimestampSetTime(* findTime )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)
 findTime More...
 
AP_TimestampSetTime(* findTimeAndRemove )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)
 findTimeAndRemove More...
 
AP_bool(* getNextStampAndRemove )(struct AP_TimestampSet *timestamp, AP_TimestampSetIndex *retIndex, AP_TimestampSetTime *retTime)
 getNextStampAndRemove More...
 
AP_uint32(* getSize )(struct AP_TimestampSet *timestamp)
 getSize More...
 
AP_char8 *(* toString )(struct AP_TimestampSet *timestamp)
 toString More...
 

Detailed Description

AP_TimestampSet_Functions.

Table of client visible functions exported by a timestamp instance. These are the only operations that may be performed by users of the timestamp object.

Note that all of these functions take an initial AP_TimestampSet* argument; this is analogous to the (hidden) 'this' pointer passed to a C++ object when a member function is invoked on it.

Member Data Documentation

◆ addNow

void(* AP_TimestampSet_Functions::addNow) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)

addNow

Add a new index-time pair to the timestamp. The given index and current time will be copied into the timestamp. If an element with the same index already exists, it will NOT be overwritten.

Parameters
timestampThe AP_TimestampSet instance
indexThe index of the new element

◆ addTime

void(* AP_TimestampSet_Functions::addTime) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index, AP_TimestampSetTime time)

addTime

Add a new index-time pair to the timestamp. The given index and time will be copied into the timestamp. If an element with the same index already exists, it will NOT be overwritten.

Parameters
timestampThe AP_TimestampSet instance
indexThe index of the new element
timeThe time of the new element

◆ findTime

AP_TimestampSetTime(* AP_TimestampSet_Functions::findTime) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)

findTime

Search for an indexed element in the timestamp and return its time.

Parameters
timestampThe AP_TimestampSet instance
indexThe element index to search for
Returns
The time associated with the given index, or 0.0 if no matching element could be found.

◆ findTimeAndRemove

AP_TimestampSetTime(* AP_TimestampSet_Functions::findTimeAndRemove) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)

findTimeAndRemove

Search for an indexed element in the timestamp and return its time. If found, the element will also be removed from the timestamp.

Parameters
timestampThe AP_TimestampSet instance
indexThe element index to search for
Returns
The time associated with the given index, or NULL if no matching element could be found. If the element was found, it will be deleted from the timestamp. Note that this function cannot distinguish between an element with a missing time and an element that does not exist - NULL will be returned in either case. The returned object (if any) must be explicitly deleted by the caller after use.

◆ getNextStampAndRemove

AP_bool(* AP_TimestampSet_Functions::getNextStampAndRemove) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex *retIndex, AP_TimestampSetTime *retTime)

getNextStampAndRemove

◆ getSize

AP_uint32(* AP_TimestampSet_Functions::getSize) (struct AP_TimestampSet *timestamp)

getSize

Return the number of elements in the AP_TimestampSet

Parameters
timestampThe AP_TimestampSet instance
Returns
The number of elements in the timestamp set

◆ replace

void(* AP_TimestampSet_Functions::replace) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index, AP_TimestampSetTime newTime)

replace

Change the time of an indexed element in the timestamp. If an element with the given index already exists, its time will be replaced with a copy of the given time. Otherwise, a new element is created just as though addTime() had been called.

Parameters
timestampThe AP_TimestampSet instance
indexThe index of the element to be updated
timeThe new time for the indexed element

◆ replaceWithNow

void(* AP_TimestampSet_Functions::replaceWithNow) (struct AP_TimestampSet *timestamp, AP_TimestampSetIndex index)

replaceWithNow

Change the time of an indexed element in the timestamp. If an element with the given index already exists, its time will be replaced with a copy of the given time. Otherwise, a new element is created just as though addNow() had been called.

Parameters
timestampThe AP_TimestampSet instance
indexThe index of the element to be updated

◆ toString

AP_char8*(* AP_TimestampSet_Functions::toString) (struct AP_TimestampSet *timestamp)

toString

Return a printable string representation of the timestamp. The returned string is owned by the caller and should be freed when it is no longer required using the char8free function.

Parameters
timestampThe AP_TimestampSet instance
Returns
Printable string representation of the timestamp

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