Stop sharing requirement_unit_state_ereq().
[freeciv.git] / common / idex.h
blob950e1414d414535fee62dea8b30ae063b7567972
1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__IDEX_H
14 #define FC__IDEX_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 /**************************************************************************
21 idex = ident index: a lookup table for quick mapping of unit and city
22 id values to unit and city pointers.
23 ***************************************************************************/
25 #include "fc_types.h"
27 void idex_init(void);
28 void idex_free(void);
30 void idex_register_city(struct city *pcity);
31 void idex_register_unit(struct unit *punit);
33 void idex_unregister_city(struct city *pcity);
34 void idex_unregister_unit(struct unit *punit);
36 struct city *idex_lookup_city(int id);
37 struct unit *idex_lookup_unit(int id);
39 #ifdef __cplusplus
41 #endif /* __cplusplus */
43 #endif /* FC__IDEX_H */