hash_node.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2011 Equinor ASA, Norway.
3
4 The file 'hash_node.h' is part of ERT - Ensemble based Reservoir Tool.
5
6 ERT is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 ERT is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE.
14
15 See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
16 for more details.
17*/
18
19#ifndef ERT_HASH_NODE_H
20#define ERT_HASH_NODE_H
21#ifdef __cplusplus
22extern "C" {
23#endif
24#include <stdbool.h>
25#include <stdint.h>
26
28
29typedef struct hash_node_struct hash_node_type;
30typedef uint32_t (hashf_type) (const char *key, size_t len);
32
33
34bool hash_node_key_eq(const hash_node_type * , uint32_t , const char *);
42const char * hash_node_get_key(const hash_node_type * );
46#ifdef __cplusplus
47}
48#endif
49#endif
bool hash_node_key_eq(const hash_node_type *, uint32_t, const char *)
uint32_t hash_node_get_global_index(const hash_node_type *)
hash_node_type * hash_node_get_next(const hash_node_type *)
void hash_node_free(hash_node_type *)
uint32_t hash_node_get_table_index(const hash_node_type *)
node_data_type * hash_node_get_data(const hash_node_type *)
void hash_node_set_next(hash_node_type *, const hash_node_type *)
hash_node_type * hash_node_alloc_new(const char *, node_data_type *, hashf_type *, uint32_t)
uint32_t() hashf_type(const char *key, size_t len)
Definition: hash_node.hpp:30
uint32_t hash_node_get_insert_nr(const hash_node_type *)
struct hash_node_struct hash_node_type
Definition: hash_node.hpp:29
void hash_node_set_insert_nr(hash_node_type *, uint32_t)
hash_data_type
Definition: hash_node.hpp:31
@ hash_string_data
Definition: hash_node.hpp:31
@ hash_double_data
Definition: hash_node.hpp:31
@ hash_int_data
Definition: hash_node.hpp:31
@ hash_ref_data
Definition: hash_node.hpp:31
uint32_t hash_node_set_table_index(hash_node_type *, uint32_t)
const char * hash_node_get_key(const hash_node_type *)
struct node_data_struct node_data_type
Definition: node_data.hpp:33