dynamiC  0.1
Functions
dynamic_dict.c File Reference

Implementation of dynamiC dictionary module. More...

#include "dynamic.h"

Go to the source code of this file.

Functions

trilean dyn_set_dict (dyn_c *dyn, dyn_ushort length)
 Set dyn to a dictionary with a max. length of elements. More...
 
dyn_cdyn_dict_insert (dyn_c *dict, dyn_const_str key, dyn_c *value)
 Insert a new key-value pair into the dictionary. More...
 
trilean dyn_dict_resize (dyn_c *dict, dyn_ushort size)
 Set the available space for elements. More...
 
trilean dyn_dict_change (dyn_c *dict, const dyn_ushort i, const dyn_c *value)
 Replace the ith element in a dictionary with a new value.
 
dyn_ushort dyn_dict_has_key (const dyn_c *dict, dyn_const_str key)
 Check if dict has key and return its position - 1 (returns 0 if not found) More...
 
dyn_cdyn_dict_get_i_ref (const dyn_c *dict, const dyn_ushort i)
 Get the reference to ith value in dict. More...
 
dyn_str dyn_dict_get_i_key (const dyn_c *dict, const dyn_ushort i)
 Get the reference to ith key in dict. More...
 
trilean dyn_dict_remove (dyn_c *dict, dyn_const_str key)
 Remove key-value pair from dictionary. More...
 
void dyn_dict_empty (dyn_c *dict)
 todo More...
 
void dyn_dict_free (dyn_c *dict)
 Free all allocated memory. More...
 
dyn_cdyn_dict_get (const dyn_c *dict, dyn_const_str key)
 Get the reference to value stored at key. More...
 
trilean dyn_dict_copy (const dyn_c *dict, dyn_c *copy)
 Copy the entire dict.
 
dyn_ushort dyn_dict_string_len (const dyn_c *dict)
 Calculate the required string length.
 
void dyn_dict_string_add (const dyn_c *dict, dyn_str string)
 Add the dict-string representation to string.
 

Detailed Description

Implementation of dynamiC dictionary module.

Author
André Dietrich
Date
14 December 2016

This project is released under the MIT-License.

Definition in file dynamic_dict.c.