pips_multimap_item_t

Updated: April 19, 2023

Single mapping in a multimap

Synopsis:

#include <pips/multimap.h>
typedef struct pips_multimap_item pips_multimap_item_t ;
struct pips_multimap_item {
    const char* key;
    size_t size;
    pips_multimap_type_e type;
    pips_multimap_value_t value;
    pips_multimap_item_t* next;
    uint8_t payload[0];
} pips_multimap_item_t;

Data:

const char* key
The key associated with the mapping
size_t size
The size, in bytes, of the item, including its payload
pips_multimap_type_e type
The type of data represented by the current mapping
pips_multimap_value_t value
The value of the mapping
pips_multimap_item_t* next
A pointer to the next item in the multimap
uint8_t payload[0]
A placeholder indicating the beginning of the item's payload data

Library:

pips-client

Description:

This data type represents a single item, as a key-value mapping, in a multimap container. Each item is allocated as a contiguous area of memory, so an item's memory can be released by a call to free(). The item's value (payload data) is appended to the end of this structure in the allocated memory buffer.