EPICS Base  7.0.7.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gpHash.h
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * SPDX-License-Identifier: EPICS
7 * EPICS Base is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /* Author: Marty Kraimer Date: 04-07-94 */
11 
12 /* gph provides a general purpose directory accessed via a hash table*/
13 
14 #ifndef INC_gpHash_H
15 #define INC_gpHash_H
16 
17 #include "libComAPI.h"
18 
19 #include "ellLib.h"
20 
21 typedef struct{
22  ELLNODE node;
23  const char *name; /*address of name placed in directory*/
24  void *pvtid; /*private name for subsystem user*/
25  void *userPvt; /*private for user*/
26 } GPHENTRY;
27 
28 struct gphPvt;
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /*tableSize must be power of 2 in range 256 to 65536*/
35 LIBCOM_API void epicsStdCall
36  gphInitPvt(struct gphPvt **ppvt, int tableSize);
37 LIBCOM_API GPHENTRY * epicsStdCall
38  gphFind(struct gphPvt *pvt, const char *name, void *pvtid);
39 LIBCOM_API GPHENTRY * epicsStdCall
40  gphFindParse(struct gphPvt *pvt, const char *name, size_t len, void *pvtid);
41 LIBCOM_API GPHENTRY * epicsStdCall
42  gphAdd(struct gphPvt *pvt, const char *name, void *pvtid);
43 LIBCOM_API void epicsStdCall
44  gphDelete(struct gphPvt *pvt, const char *name, void *pvtid);
45 LIBCOM_API void epicsStdCall gphFreeMem(struct gphPvt *pvt);
46 LIBCOM_API void epicsStdCall gphDump(struct gphPvt *pvt);
47 LIBCOM_API void epicsStdCall gphDumpFP(FILE *fp, struct gphPvt *pvt);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif /* INC_gpHash_H */
List node type.
Definition: ellLib.h:46
A doubly-linked list library.