GATE
Loading...
Searching...
No Matches
gate_flatmap_class Struct Reference

A flat map stores an array of key/value pair, the key needs to be unique. More...

#include <maps.h>

Data Fields

gate_comparer_t key_comparer
 
gate_size_t key_size
 
gate_mem_copyctor_t key_constructor
 
gate_mem_dtor_t key_destructor
 
gate_size_t value_size
 
gate_mem_copyctor_t value_constructor
 
gate_mem_dtor_t value_destructor
 
gate_size_t item_count
 
gate_size_t item_capacity
 
gate_size_t item_size
 
gate_size_t item_key_offset
 
gate_size_t item_value_offset
 
gate_mapping_t ** items
 

Detailed Description

A flat map stores an array of key/value pair, the key needs to be unique.

This map type preserves the order in which items were added at its end. Key searchs have complexity of "O(n)".

Field Documentation

◆ key_comparer

gate_comparer_t key_comparer

Pointer to comparer function to search for keys

◆ key_size

gate_size_t key_size

Size of key element

◆ key_constructor

gate_mem_copyctor_t key_constructor

Constructor function of key elements

◆ key_destructor

gate_mem_dtor_t key_destructor

Destructor function of key elements

◆ value_size

gate_size_t value_size

Size of value element

◆ value_constructor

gate_mem_copyctor_t value_constructor

Constructor function of value elements

◆ value_destructor

gate_mem_dtor_t value_destructor

Destructor function of value elements

◆ item_count

gate_size_t item_count

currently used content pointers

◆ item_capacity

gate_size_t item_capacity

amount of allocated content pointers

◆ item_size

gate_size_t item_size

total size of item (mapping-header + key + value)

◆ item_key_offset

gate_size_t item_key_offset

offset of key content within item block

◆ item_value_offset

gate_size_t item_value_offset

offset of value content within item block

◆ items

gate_mapping_t** items

array of pointers to entries (containing key/value)


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