hash.hpp File Reference
#include <stdlib.h>
#include <ert/util/stringlist.hpp>
#include <ert/util/type_macros.hpp>
#include <ert/util/node_data.hpp>
Include dependency graph for hash.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct hash_struct hash_type
 
typedef struct hash_iter_struct hash_iter_type
 
typedef void() hash_apply_ftype(void *)
 

Functions

 UTIL_SAFE_CAST_HEADER (hash)
 
 UTIL_SAFE_CAST_HEADER_CONST (hash)
 
hash_typehash_alloc (void)
 
void hash_iter_complete (hash_type *)
 
void hash_free (hash_type *)
 
void hash_free__ (void *)
 
void hash_insert_ref (hash_type *, const char *, const void *)
 
void hash_insert_copy (hash_type *, const char *, const void *, copyc_ftype *, free_ftype *)
 
void hash_insert_string (hash_type *, const char *, const char *)
 
bool hash_has_key (const hash_type *, const char *)
 
void * hash_pop (hash_type *hash, const char *key)
 
void * hash_safe_get (const hash_type *hash, const char *key)
 
void * hash_get (const hash_type *, const char *)
 
char * hash_get_string (const hash_type *, const char *)
 
void hash_del (hash_type *, const char *)
 
void hash_safe_del (hash_type *, const char *)
 
void hash_clear (hash_type *)
 
int hash_get_size (const hash_type *)
 
void hash_set_keylist (const hash_type *, char **)
 
char ** hash_alloc_keylist (const hash_type *)
 
stringlist_typehash_alloc_stringlist (const hash_type *)
 
char ** hash_alloc_sorted_keylist (const hash_type *hash, int(hash_get_cmp_value)(const void *))
 
char ** hash_alloc_key_sorted_list (const hash_type *hash, int(*cmp)(const void *, const void *))
 
bool hash_key_list_compare (const hash_type *hash1, const hash_type *hash2)
 
void hash_insert_hash_owned_ref (hash_type *, const char *, const void *, free_ftype *)
 
void hash_resize (hash_type *hash, int new_size)
 
hash_iter_typehash_iter_alloc (const hash_type *)
 
void hash_iter_free (hash_iter_type *)
 
bool hash_iter_is_complete (const hash_iter_type *)
 
const char * hash_iter_get_next_key (hash_iter_type *)
 
void * hash_iter_get_next_value (hash_iter_type *)
 
void hash_iter_restart (hash_iter_type *iter)
 
hash_typehash_alloc_from_options (const stringlist_type *)
 
bool hash_add_option (hash_type *hash, const char *key_value)
 
int hash_inc_counter (hash_type *hash, const char *counter_key)
 
int hash_get_counter (const hash_type *hash, const char *key)
 
void hash_insert_int (hash_type *, const char *, int)
 
int hash_get_int (const hash_type *, const char *)
 
void hash_insert_double (hash_type *, const char *, double)
 
double hash_get_double (const hash_type *, const char *)
 
void hash_apply (hash_type *hash, hash_apply_ftype *func)
 
 UTIL_IS_INSTANCE_HEADER (hash)
 

Typedef Documentation

◆ hash_apply_ftype

typedef void() hash_apply_ftype(void *)

◆ hash_iter_type

typedef struct hash_iter_struct hash_iter_type

◆ hash_type

typedef struct hash_struct hash_type

Function Documentation

◆ hash_add_option()

bool hash_add_option ( hash_type hash,
const char *  key_value 
)

◆ hash_alloc()

hash_type * hash_alloc ( void  )

◆ hash_alloc_from_options()

hash_type * hash_alloc_from_options ( const stringlist_type )

◆ hash_alloc_key_sorted_list()

char ** hash_alloc_key_sorted_list ( const hash_type hash,
int(*)(const void *, const void *)  cmp 
)

◆ hash_alloc_keylist()

char ** hash_alloc_keylist ( const hash_type )

◆ hash_alloc_sorted_keylist()

char ** hash_alloc_sorted_keylist ( const hash_type hash,
int(hash_get_cmp_value)(const void *)   
)

◆ hash_alloc_stringlist()

stringlist_type * hash_alloc_stringlist ( const hash_type )

◆ hash_apply()

void hash_apply ( hash_type hash,
hash_apply_ftype func 
)

◆ hash_clear()

void hash_clear ( hash_type )

◆ hash_del()

void hash_del ( hash_type ,
const char *   
)

◆ hash_free()

void hash_free ( hash_type )

◆ hash_free__()

void hash_free__ ( void *  )

◆ hash_get()

void * hash_get ( const hash_type ,
const char *   
)

◆ hash_get_counter()

int hash_get_counter ( const hash_type hash,
const char *  key 
)

◆ hash_get_double()

double hash_get_double ( const hash_type ,
const char *   
)

◆ hash_get_int()

int hash_get_int ( const hash_type ,
const char *   
)

◆ hash_get_size()

int hash_get_size ( const hash_type )

◆ hash_get_string()

char * hash_get_string ( const hash_type ,
const char *   
)

◆ hash_has_key()

bool hash_has_key ( const hash_type ,
const char *   
)

◆ hash_inc_counter()

int hash_inc_counter ( hash_type hash,
const char *  counter_key 
)

◆ hash_insert_copy()

void hash_insert_copy ( hash_type ,
const char *  ,
const void *  ,
copyc_ftype ,
free_ftype  
)

◆ hash_insert_double()

void hash_insert_double ( hash_type ,
const char *  ,
double   
)

◆ hash_insert_hash_owned_ref()

void hash_insert_hash_owned_ref ( hash_type ,
const char *  ,
const void *  ,
free_ftype  
)

◆ hash_insert_int()

void hash_insert_int ( hash_type ,
const char *  ,
int   
)

◆ hash_insert_ref()

void hash_insert_ref ( hash_type ,
const char *  ,
const void *   
)

◆ hash_insert_string()

void hash_insert_string ( hash_type ,
const char *  ,
const char *   
)

◆ hash_iter_alloc()

hash_iter_type * hash_iter_alloc ( const hash_type )

◆ hash_iter_complete()

void hash_iter_complete ( hash_type )

◆ hash_iter_free()

void hash_iter_free ( hash_iter_type )

◆ hash_iter_get_next_key()

const char * hash_iter_get_next_key ( hash_iter_type )

◆ hash_iter_get_next_value()

void * hash_iter_get_next_value ( hash_iter_type )

◆ hash_iter_is_complete()

bool hash_iter_is_complete ( const hash_iter_type )

◆ hash_iter_restart()

void hash_iter_restart ( hash_iter_type iter)

◆ hash_key_list_compare()

bool hash_key_list_compare ( const hash_type hash1,
const hash_type hash2 
)

◆ hash_pop()

void * hash_pop ( hash_type hash,
const char *  key 
)

◆ hash_resize()

void hash_resize ( hash_type hash,
int  new_size 
)

◆ hash_safe_del()

void hash_safe_del ( hash_type ,
const char *   
)

◆ hash_safe_get()

void * hash_safe_get ( const hash_type hash,
const char *  key 
)

◆ hash_set_keylist()

void hash_set_keylist ( const hash_type ,
char **   
)

◆ UTIL_IS_INSTANCE_HEADER()

UTIL_IS_INSTANCE_HEADER ( hash  )

◆ UTIL_SAFE_CAST_HEADER()

UTIL_SAFE_CAST_HEADER ( hash  )

◆ UTIL_SAFE_CAST_HEADER_CONST()

UTIL_SAFE_CAST_HEADER_CONST ( hash  )