TIBCO FTL®

Macros | Typedefs | Functions
mapiter.h File Reference

Map iterators iterate over the key/value pairs in a map. More...

## Macros
#define | TIB_MAPITER_PROPERTY_STRING_MATCHER "com.tibco.ftl.client.map.iter.matcher"
| Property for map iterator matcher; string. More...

## Typedefs
typedef struct __tibMapIteratorId * | tibMapIterator

## Functions
TIB_API const char * | tibMapIterator_CurrentKey (tibEx e, tibMapIterator mapIterator)
| Get the key from the current key/value pair. More...
TIB_API tibMessage | tibMapIterator_CurrentValue (tibEx e, tibMapIterator mapIterator)
| Get the message value from the current key/value pair. More...
TIB_API void | tibMapIterator_Destroy (tibEx e, tibMapIterator mapIterator)
| Destroy a map iterator object, reclaiming its resources. More...
TIB_API tibbool_t | tibMapIterator_Next (tibEx e, tibMapIterator mapIterator)
| Iterate to the next key/value pair. More...

## Detailed Description

Map iterators iterate over the key/value pairs in a map.

An iterator can produce values added to a map after the iterator is created.

To create a map iterator object, see tibMap_CreateIterator.

This file defines map iterator calls.

## Macro Definition Documentation

## ◆ TIB_MAPITER_PROPERTY_STRING_MATCHER

#define TIB_MAPITER_PROPERTY_STRING_MATCHER "com.tibco.ftl.client.map.iter.matcher"

Property for map iterator matcher; string.

Limit the iterator to only matches of the value to this string.

See tibMap_CreateIterator and tibMap_CreateIteratorWithLock.

## Typedef Documentation

## ◆ tibMapIterator

typedef struct __tibMapIteratorId* tibMapIterator

## Function Documentation

## ◆ tibMapIterator_CurrentKey()

TIB_API const char * tibMapIterator_CurrentKey | ( | tibEx | e,
|  | tibMapIterator | mapIterator
| ) |  |

Get the key from the current key/value pair.

The library owns the key string, and may destroy it after the program calls tibMapIterator_Next or tibMapIterator_Destroy.

Parameters

  e | The exception object captures information about failures.
  mapIterator | The call gets the key from the current pair of this iterator.

Returns
  The key string.

## ◆ tibMapIterator_CurrentValue()

TIB_API tibMessage tibMapIterator_CurrentValue | ( | tibEx | e,
|  | tibMapIterator | mapIterator
| ) |  |

Get the message value from the current key/value pair.

The library owns the message object, and may destroy it after the program calls tibMapIterator_Next or tibMapIterator_Destroy.

Parameters

  e | The exception object captures information about failures.
  mapIterator | The call gets the value from the current pair of this iterator.

Returns
  The value (which is a message object).

## ◆ tibMapIterator_Destroy()

TIB_API void tibMapIterator_Destroy | ( | tibEx | e,
|  | tibMapIterator | mapIterator
| ) |  |

Destroy a map iterator object, reclaiming its resources.

Parameters

  e | The exception object captures information about failures.
  mapIterator | The call destroys this iterator object.

## ◆ tibMapIterator_Next()

TIB_API tibbool_t tibMapIterator_Next | ( | tibEx | e,
|  | tibMapIterator | mapIterator
| ) |  |

Iterate to the next key/value pair.

If the iterator has an associated lock and the process does not hold that lock, the call throws an exception and does not advance to the next pair. (See also tibMap_CreateIteratorWithLock.)

To get the key and value from each pair, see tibMapIterator_CurrentKey and tibMapIterator_CurrentValue.

Parameters

  e | The exception object captures information about failures.
  mapIterator | The call advances the focus of this iterator to the next pair.

Returns
  - True indicates that the next pair is ready.
  - False indicates that the iteration is complete.