4
/*============================================================================
5
* Map helper structures
6
*============================================================================*/
9
This file is part of Code_Saturne, a general-purpose CFD tool.
11
Copyright (C) 1998-2011 EDF S.A.
13
This program is free software; you can redistribute it and/or modify it under
14
the terms of the GNU General Public License as published by the Free Software
15
Foundation; either version 2 of the License, or (at your option) any later
18
This program is distributed in the hope that it will be useful, but WITHOUT
19
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23
You should have received a copy of the GNU General Public License along with
24
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25
Street, Fifth Floor, Boston, MA 02110-1301, USA.
28
/*----------------------------------------------------------------------------*/
30
/*----------------------------------------------------------------------------
32
*----------------------------------------------------------------------------*/
36
/*----------------------------------------------------------------------------*/
40
/*============================================================================
42
*============================================================================*/
44
/*============================================================================
46
*============================================================================*/
48
typedef struct _cs_map_name_to_id_t cs_map_name_to_id_t;
50
/*============================================================================
52
*============================================================================*/
54
/*=============================================================================
55
* Public function prototypes for Fortran API
56
*============================================================================*/
58
/*=============================================================================
59
* Public function prototypes
60
*============================================================================*/
62
/*----------------------------------------------------------------------------
63
* Create empty name to id map.
66
* pointer to newly initialized map structure.
67
*----------------------------------------------------------------------------*/
70
cs_map_name_to_id_create(void);
72
/*----------------------------------------------------------------------------
73
* Destroy name to id map structure.
76
* m <-> pointer to map structure.
77
*----------------------------------------------------------------------------*/
80
cs_map_name_to_id_destroy(cs_map_name_to_id_t **m);
82
/*----------------------------------------------------------------------------
83
* Find id matching a key, inserting key if not already present.
86
* m <-> pointer to map structure
87
* key <-- character string (key)
90
* id matching key (already present or newly inserted)
91
*----------------------------------------------------------------------------*/
94
cs_map_name_to_id(cs_map_name_to_id_t *m,
97
/*----------------------------------------------------------------------------
98
* Return the size of a map.
101
* m <-- pointer to map structure.
104
* number of entries in map.
105
*----------------------------------------------------------------------------*/
108
cs_map_name_to_id_size(const cs_map_name_to_id_t *m);
110
/*----------------------------------------------------------------------------
111
* Return a given key in a map.
114
* m <-- pointer to map structure.
119
*----------------------------------------------------------------------------*/
122
cs_map_name_to_id_key(const cs_map_name_to_id_t *m,
125
/*----------------------------------------------------------------------------*/
129
#endif /* __CS_MAP_H__ */