pelib  2.0.0
include/pelib/map.h File Reference
#include <pelib/template.h>
#include <pelib/structure.h>
Include dependency graph for map.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define map(key, value)   PELIB_CONCAT_4(map_, key, _, value)
#define map_t(key, value)   PELIB_CONCAT_2(map(key, value), _t)
#define map_iterator(key, value)   PELIB_CONCAT_2(map_, iterator(pair_t(key, value)))
#define map_iterator_t(key, value)   PELIB_CONCAT_2(map_iterator(key, value), _t)
#define pelib_map_begin(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _begin)
#define pelib_map_end(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _end)
#define pelib_map_next(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _next)
#define pelib_map_read(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _read)
#define pelib_map_insert(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _insert)
#define pelib_map_find(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _find)
#define pelib_map_compare(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _compare)
#define pelib_map_size(key, value)   PELIB_CONCAT_3(pelib_, map(key, value), _size)
#define STRUCT_T   map_t(MAP_KEY_T, MAP_VALUE_T)

Functions

struct map (MAP_KEY_T, MAP_VALUE_T)
struct iterator (pair_t(MAP_KEY_T, MAP_VALUE_T)) map_iterator_t(MAP_KEY_T
 iterator_t (pair_t(MAP_KEY_T, MAP_VALUE_T))*pelib_map_begin(MAP_KEY_T
 MAP_VALUE_T (map_t(MAP_KEY_T, MAP_VALUE_T)*)
int pelib_map_insert (MAP_KEY_T, MAP_VALUE_T)(map_t(MAP_KEY_T
int MAP_VALUE_T pair_t (MAP_KEY_T, MAP_VALUE_T))
 MAP_VALUE_T (map_t(MAP_KEY_T, MAP_VALUE_T)*, MAP_KEY_T)
int pelib_map_compare (MAP_KEY_T, MAP_VALUE_T)(map_t(MAP_KEY_T
int MAP_VALUE_T map_t (MAP_KEY_T, MAP_VALUE_T)*a2)
 MAP_VALUE_T (iterator_t(pair_t(MAP_KEY_T, MAP_VALUE_T))*)
size_t pelib_map_size (MAP_KEY_T, MAP_VALUE_T)(map_t(MAP_KEY_T

Variables

int MAP_VALUE_Ta1

Define Documentation

#define map (   key,
  value 
)    PELIB_CONCAT_4(map_, key, _, value)

Definition at line 26 of file map.h.

#define map_iterator (   key,
  value 
)    PELIB_CONCAT_2(map_, iterator(pair_t(key, value)))

Definition at line 28 of file map.h.

#define map_iterator_t (   key,
  value 
)    PELIB_CONCAT_2(map_iterator(key, value), _t)

Definition at line 29 of file map.h.

#define map_t (   key,
  value 
)    PELIB_CONCAT_2(map(key, value), _t)

Definition at line 27 of file map.h.

#define pelib_map_begin (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _begin)

Definition at line 42 of file map.h.

#define pelib_map_compare (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _compare)

Definition at line 48 of file map.h.

#define pelib_map_end (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _end)

Definition at line 43 of file map.h.

#define pelib_map_find (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _find)

Definition at line 47 of file map.h.

#define pelib_map_insert (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _insert)

Definition at line 46 of file map.h.

#define pelib_map_next (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _next)

Definition at line 44 of file map.h.

#define pelib_map_read (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _read)

Definition at line 45 of file map.h.

#define pelib_map_size (   key,
  value 
)    PELIB_CONCAT_3(pelib_, map(key, value), _size)

Definition at line 49 of file map.h.

Definition at line 59 of file map.h.


Function Documentation

struct iterator ( pair_t(MAP_KEY_T, MAP_VALUE_T ) [read]
struct map ( MAP_KEY_T  ,
MAP_VALUE_T   
) [read]

Generic static map

Address where elements are stored

Definition at line 52 of file map.h.

Compares all elements of two maps one by one

Returns:
If a1 and a2 have the same number of elements, for the first pair of elements from both maps a1 and a2 that are different, return -1 if the element of a1 is lower than the element of a2, 1 otherwise. Returns 0 if all elements are identical. If a1 has less elements than a2, then returns -1 other wise returns 1.

Variable Documentation

Definition at line 82 of file map.h.