CAEN Utility
2.0.2
Utilities for CAEN projects
CAENMapTypes.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* CAEN SpA - Software Division
4
* Via Vetraia, 11 - 55049 - Viareggio ITALY
5
* +39 0594 388 398 - www.caen.it
6
*
7
*******************************************************************************
8
*
9
* Copyright (C) 2014 rxi
10
*
11
* This file is part of the CAEN Utility.
12
*
13
* This file is distributed under the MIT License.
14
*
15
* SPDX-License-Identifier: MIT
16
*
17
***************************************************************************/
25
#ifndef CAEN_INCLUDE_TYPES_CAENMAPTYPES_H_
26
#define CAEN_INCLUDE_TYPES_CAENMAPTYPES_H_
27
36
#ifdef __cplusplus
37
extern
"C"
{
38
#endif
39
40
#include <stdlib.h>
41
#include <stdbool.h>
42
43
/***************************
44
* Types
45
***************************/
46
struct
c_map_node_t
;
47
typedef
struct
c_map_node_t
c_map_node_t
;
48
50
typedef
struct
{
51
c_map_node_t
**
buckets
;
52
size_t
nbuckets
;
53
size_t
nnodes
;
54
bool
initialized
;
55
}
c_map_base_t
;
56
58
typedef
struct
{
59
size_t
bucketidx
;
60
c_map_node_t
*
node
;
61
}
c_map_iter_t
;
62
69
#define c_map_t(T) struct { c_map_base_t base; T *ref; T tmp; }
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif // CAEN_INCLUDE_TYPES_CAENMAPTYPES_H_
c_map_base_t
Base type for maps.
Definition:
CAENMapTypes.h:50
c_map_iter_t::bucketidx
size_t bucketidx
Definition:
CAENMapTypes.h:59
c_map_node_t
Definition:
CAENMap.c:33
c_map_base_t::nnodes
size_t nnodes
Definition:
CAENMapTypes.h:53
c_map_iter_t
Iterator.
Definition:
CAENMapTypes.h:58
c_map_base_t::buckets
c_map_node_t ** buckets
Definition:
CAENMapTypes.h:51
c_map_base_t::nbuckets
size_t nbuckets
Definition:
CAENMapTypes.h:52
c_map_base_t::initialized
bool initialized
Definition:
CAENMapTypes.h:54
c_map_iter_t::node
c_map_node_t * node
Definition:
CAENMapTypes.h:60
include
types
CAENMapTypes.h
Generated on Mon Mar 11 2024 13:49:38 for CAEN Utility by
1.8.13