LibCDS
TreeMap Struct Reference

The implementation for ordered map. More...

Data Fields

TreeMapDatapData
 The container private information. More...
 
int32_t(* put )(struct _TreeMap *, Pair *)
 Insert a key value pair into the map. More...
 
int32_t(* get )(struct _TreeMap *, Key, Value *)
 Retrieve the value corresponding to the designated key. More...
 
int32_t(* find )(struct _TreeMap *, Key)
 Check if the map contains the designated key. More...
 
int32_t(* remove )(struct _TreeMap *, Key)
 Delete the key value pair corresponding to the designated key. More...
 
int32_t(* size )(struct _TreeMap *)
 Return the number of stored key value pairs. More...
 
int32_t(* minimum )(struct _TreeMap *, Pair **)
 Retrieve the key value pair with the minimum order from the map. More...
 
int32_t(* maximum )(struct _TreeMap *, Pair **)
 Retrieve the key value pair with the maximum order from the map. More...
 
int32_t(* predecessor )(struct _TreeMap *, Key, Pair **)
 Retrieve the key value pair which is the predecessor of the given key. More...
 
int32_t(* successor )(struct _TreeMap *, Key, Pair **)
 Retrieve the key value pair which is the successor of the given key. More...
 
int32_t(* iterate )(struct _TreeMap *, bool, Pair **)
 Iterate through the map from the minimum order to the maximum order. More...
 
int32_t(* reverse_iterate )(struct _TreeMap *, bool, Pair **)
 Iterate through the map from the maximum order to the minimum order. More...
 
int32_t(* set_compare )(struct _TreeMap *, int32_t(*)(Key, Key))
 Set the custom key comparison method. More...
 
int32_t(* set_destroy )(struct _TreeMap *, void(*)(Pair *))
 Set the custom key value pair resource clean method. More...
 

Detailed Description

The implementation for ordered map.

Definition at line 14 of file tree_map.h.

Field Documentation

TreeMapData* TreeMap::pData

The container private information.

Definition at line 16 of file tree_map.h.

int32_t(* TreeMap::put)(struct _TreeMap *, Pair *)

Insert a key value pair into the map.

See Also
TreeMapPut

Definition at line 20 of file tree_map.h.

int32_t(* TreeMap::get)(struct _TreeMap *, Key, Value *)

Retrieve the value corresponding to the designated key.

See Also
TreeMapGet

Definition at line 24 of file tree_map.h.

int32_t(* TreeMap::find)(struct _TreeMap *, Key)

Check if the map contains the designated key.

See Also
TreeMapFind

Definition at line 28 of file tree_map.h.

int32_t(* TreeMap::remove)(struct _TreeMap *, Key)

Delete the key value pair corresponding to the designated key.

See Also
TreeMapRemove

Definition at line 32 of file tree_map.h.

int32_t(* TreeMap::size)(struct _TreeMap *)

Return the number of stored key value pairs.

See Also
TreeMapSize

Definition at line 36 of file tree_map.h.

int32_t(* TreeMap::minimum)(struct _TreeMap *, Pair **)

Retrieve the key value pair with the minimum order from the map.

See Also
TreeMapMinimum

Definition at line 40 of file tree_map.h.

int32_t(* TreeMap::maximum)(struct _TreeMap *, Pair **)

Retrieve the key value pair with the maximum order from the map.

See Also
TreeMapMaximum

Definition at line 44 of file tree_map.h.

int32_t(* TreeMap::predecessor)(struct _TreeMap *, Key, Pair **)

Retrieve the key value pair which is the predecessor of the given key.

See Also
TreeMapPredecessor

Definition at line 48 of file tree_map.h.

int32_t(* TreeMap::successor)(struct _TreeMap *, Key, Pair **)

Retrieve the key value pair which is the successor of the given key.

See Also
TreeMapSuccessor

Definition at line 52 of file tree_map.h.

int32_t(* TreeMap::iterate)(struct _TreeMap *, bool, Pair **)

Iterate through the map from the minimum order to the maximum order.

See Also
TreeMapIterate

Definition at line 56 of file tree_map.h.

int32_t(* TreeMap::reverse_iterate)(struct _TreeMap *, bool, Pair **)

Iterate through the map from the maximum order to the minimum order.

See Also
TreeMapReverseIterate

Definition at line 60 of file tree_map.h.

int32_t(* TreeMap::set_compare)(struct _TreeMap *, int32_t(*)(Key, Key))

Set the custom key comparison method.

See Also
TreeMapSetCompare

Definition at line 64 of file tree_map.h.

int32_t(* TreeMap::set_destroy)(struct _TreeMap *, void(*)(Pair *))

Set the custom key value pair resource clean method.

See Also
TreeMapSetDestroy

Definition at line 68 of file tree_map.h.