1 #if !defined( KEYMAP_INCLUDED ) /* Include this file only once */
2 #define KEYMAP_INCLUDED
3 /*
4 *+
5 *  Name:
6 *     keymap.h
7 
8 *  Type:
9 *     C include file.
10 
11 *  Purpose:
12 *     Define the interface to the KeyMap class.
13 
14 *  Invocation:
15 *     #include "keymap.h"
16 
17 *  Description:
18 *     This include file defines the interface to the KeyMap class and
19 *     provides the type definitions, function prototypes and macros,
20 *     etc.  needed to use this class.
21 *
22 *     The KeyMap class extends the Object class to represent a set of
23 *     key/value pairs. Keys are strings, and values can be integer,
24 *     floating point, string or Object - scalar of vector.
25 
26 *  Inheritance:
27 *     The KeyMap class inherits from the Object class.
28 
29 *  Copyright:
30 *     Copyright (C) 1997-2006 Council for the Central Laboratory of the
31 *     Research Councils
32 
33 *  Licence:
34 *     This program is free software: you can redistribute it and/or
35 *     modify it under the terms of the GNU Lesser General Public
36 *     License as published by the Free Software Foundation, either
37 *     version 3 of the License, or (at your option) any later
38 *     version.
39 *
40 *     This program is distributed in the hope that it will be useful,
41 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
42 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43 *     GNU Lesser General Public License for more details.
44 *
45 *     You should have received a copy of the GNU Lesser General
46 *     License along with this program.  If not, see
47 *     <http://www.gnu.org/licenses/>.
48 
49 *  Authors:
50 *     DSB: David S. Berry (Starlink)
51 
52 *  History:
53 *     13-NOV-2004 (DSB):
54 *        Original version.
55 *     5-JUN-2006 (DSB):
56 *        Added support for single precision entries.
57 *     7-MAR-2008 (DSB):
58 *        Added support for pointer ("P") entries.
59 *-
60 */
61 
62 /* Include files. */
63 /* ============== */
64 /* Interface definitions. */
65 /* ---------------------- */
66 #include "object.h"              /* Coordinate objects (parent class) */
67 
68 /* C header files. */
69 /* --------------- */
70 
71 /* Macros */
72 /* ====== */
73 /* Data type constants: */
74 #define AST__BADTYPE 0
75 #define AST__INTTYPE 1
76 #define AST__DOUBLETYPE 2
77 #define AST__STRINGTYPE 3
78 #define AST__OBJECTTYPE 4
79 #define AST__FLOATTYPE 5
80 #define AST__POINTERTYPE 6
81 #define AST__SINTTYPE 7
82 #define AST__UNDEFTYPE 8
83 #define AST__BYTETYPE 9
84 
85 /* Define constants used to size global arrays in this module. */
86 #define AST__KEYMAP_GETATTRIB_BUFF_LEN 50       /* Max length of string returned by GetAttrib */
87 #define AST__KEYMAP_CONVERTVALUE_MAX_STRINGS 50 /* Number of string values to buffer in ConvertValue */
88 #define AST__KEYMAP_CONVERTVALUE_BUFF_LEN 50    /* Max. characters in result buffer for ConvertValue */
89 #define AST__KEYMAP_MAPKEY_MAX_STRINGS 50       /* Number of string values to buffer in MapKey */
90 
91 /* Define a dummy __attribute__ macro for use on non-GNU compilers. */
92 #ifndef __GNUC__
93 #  define  __attribute__(x)  /*NOTHING*/
94 #endif
95 
96 /* Maximum key length when using case insensitive keymaps */
97 #define AST__MXKEYLEN 200
98 
99 /* Type Definitions. */
100 /* ================= */
101 
102 /* This structure contains information describing a single generic entry in
103    a KeyMap. This structure is extended by other structures to hold data of
104    specific data types. */
105 
106 typedef struct AstMapEntry {
107    struct AstMapEntry *next; /* Pointer to next structure in unsorted list. */
108    const char *key;          /* The name used to identify the entry */
109    unsigned long hash;       /* The full width hash value */
110    int type;                 /* Data type. */
111    int nel;                  /* 0 => scalar, >0 => array with "nel" elements */
112    const char *comment;      /* Pointer to a comment for the entry */
113    int defined;              /* Non-zero if the entry value is defined */
114    struct AstMapEntry *snext;/* Pointer to next structure in sorted list. */
115    struct AstMapEntry *sprev;/* Pointer to previous structure in sorted list. */
116    int member;               /* No. of values added to KeyMap prior to this one  */
117    int keymember;            /* No. of keys added to KeyMap prior to this one  */
118    int sortby;               /* Used for comunnication with qsort function */
119 } AstMapEntry;
120 
121 /* KeyMap structure. */
122 /* ------------------ */
123 /* This structure contains all information that is unique to each object in
124    the class (e.g. its instance variables). */
125 typedef struct AstKeyMap {
126 
127 /* Attributes inherited from the parent class. */
128    AstObject object;               /* Parent class structure */
129 
130 /* Attributes specific to objects in this class. */
131    int sizeguess;                  /* Guess at KeyMap size */
132    AstMapEntry **table;            /* Hash table containing pointers to
133                                       the KeyMap entries */
134    int *nentry;                    /* No. of Entries in each table element */
135    int mapsize;                    /* Length of table */
136    int keycase;                    /* Are keys case sensitive? */
137    int keyerror;                   /* Report error if no key? */
138    int maplocked;                  /* Prevent addition of new entries? */
139    int sortby;                     /* How the keys should be sorted */
140    AstMapEntry *first;             /* Pointer to first structure in sorted list. */
141    int nsorted;                    /* Length of sorted list */
142    int member_count;               /* Total no. of values ever added to keyMap */
143    AstMapEntry *firstA;            /* Pointer to first "AST object"-type entry */
144    int iter_itab;                  /* Next hash table entry to return */
145    AstMapEntry *iter_entry;        /* Next entry to return */
146 } AstKeyMap;
147 
148 /* Virtual function table. */
149 /* ----------------------- */
150 /* This table contains all information that is the same for all
151    objects in the class (e.g. pointers to its virtual functions). */
152 #if defined(astCLASS)            /* Protected */
153 typedef struct AstKeyMapVtab {
154 
155 /* Properties (e.g. methods) inherited from the parent class. */
156    AstObjectVtab object_vtab;  /* Parent class virtual function table */
157 
158 /* A Unique identifier to determine class membership. */
159    AstClassIdentifier id;
160 
161 /* Properties (e.g. methods) specific to this class. */
162    void (* MapPut0I)( AstKeyMap *, const char *, int, const char *, int * );
163    void (* MapPut0D)( AstKeyMap *, const char *, double, const char *, int * );
164    void (* MapPut0B)( AstKeyMap *, const char *, unsigned char, const char *, int * );
165    void (* MapPut0S)( AstKeyMap *, const char *, short int, const char *, int * );
166    void (* MapPut0F)( AstKeyMap *, const char *, float, const char *, int * );
167    void (* MapPut0C)( AstKeyMap *, const char *, const char *, const char *, int * );
168    void (* MapPut0A)( AstKeyMap *, const char *, AstObject *, const char *, int * );
169    void (* MapPut0P)( AstKeyMap *, const char *, void *, const char *, int * );
170    void (* MapPut1I)( AstKeyMap *, const char *, int, const int[], const char *, int * );
171    void (* MapPut1D)( AstKeyMap *, const char *, int, const double[], const char *, int * );
172    void (* MapPut1B)( AstKeyMap *, const char *, int, const unsigned char[], const char *, int * );
173    void (* MapPut1S)( AstKeyMap *, const char *, int, const short int[], const char *, int * );
174    void (* MapPut1F)( AstKeyMap *, const char *, int, const float[], const char *, int * );
175    void (* MapPut1C)( AstKeyMap *, const char *, int, const char *const [], const char *, int * );
176    void (* MapPut1A)( AstKeyMap *, const char *, int, AstObject *const [], const char *, int * );
177    void (* MapPut1P)( AstKeyMap *, const char *, int, void *const [], const char *, int * );
178    void (* MapPutU)( AstKeyMap *, const char *, const char *, int * );
179    int (* MapGet0I)( AstKeyMap *, const char *, int *, int * );
180    int (* MapGet0D)( AstKeyMap *, const char *, double *, int * );
181    int (* MapGet0B)( AstKeyMap *, const char *, unsigned char *, int * );
182    int (* MapGet0S)( AstKeyMap *, const char *, short int *, int * );
183    int (* MapGet0F)( AstKeyMap *, const char *, float *, int * );
184    int (* MapGet0C)( AstKeyMap *, const char *, const char **, int * );
185    int (* MapGet0A)( AstKeyMap *, const char *, AstObject **, int * );
186    int (* MapGet0P)( AstKeyMap *, const char *, void **, int * );
187    int (* MapGet1A)( AstKeyMap *, const char *, int, int *, AstObject **, int * );
188    int (* MapGet1P)( AstKeyMap *, const char *, int, int *, void **, int * );
189    int (* MapGet1C)( AstKeyMap *, const char *, int, int, int *, char *, int * );
190    int (* MapGet1D)( AstKeyMap *, const char *, int, int *, double *, int * );
191    int (* MapGet1B)( AstKeyMap *, const char *, int, int *, unsigned char *, int * );
192    int (* MapGet1S)( AstKeyMap *, const char *, int, int *, short int *, int * );
193    int (* MapGet1F)( AstKeyMap *, const char *, int, int *, float *, int * );
194    int (* MapGet1I)( AstKeyMap *, const char *, int, int *, int *, int * );
195    int (* MapGetElemA)( AstKeyMap *, const char *, int, AstObject **, int * );
196    int (* MapGetElemP)( AstKeyMap *, const char *, int, void **, int * );
197    int (* MapGetElemC)( AstKeyMap *, const char *, int, int, char *, int * );
198    int (* MapGetElemD)( AstKeyMap *, const char *, int, double *, int * );
199    int (* MapGetElemB)( AstKeyMap *, const char *, int, unsigned char *, int * );
200    int (* MapGetElemS)( AstKeyMap *, const char *, int, short int *, int * );
201    int (* MapGetElemF)( AstKeyMap *, const char *, int, float *, int * );
202    int (* MapGetElemI)( AstKeyMap *, const char *, int, int *, int * );
203    void (* MapPutElemA)( AstKeyMap *, const char *, int, AstObject *, int * );
204    void (* MapPutElemP)( AstKeyMap *, const char *, int, void *, int * );
205    void (* MapPutElemC)( AstKeyMap *, const char *, int, const char *, int * );
206    void (* MapPutElemD)( AstKeyMap *, const char *, int, double, int * );
207    void (* MapPutElemB)( AstKeyMap *, const char *, int, unsigned char, int * );
208    void (* MapPutElemS)( AstKeyMap *, const char *, int, short int, int * );
209    void (* MapPutElemF)( AstKeyMap *, const char *, int, float, int * );
210    void (* MapPutElemI)( AstKeyMap *, const char *, int, int, int * );
211    void (* MapRemove)( AstKeyMap *, const char *, int * );
212    void (* MapRename)( AstKeyMap *, const char *, const char *, int * );
213    void (* MapCopy)( AstKeyMap *, AstKeyMap *, int * );
214    int (* MapSize)( AstKeyMap *, int * );
215    int (* MapLength)( AstKeyMap *, const char *, int * );
216    int (* MapLenC)( AstKeyMap *, const char *, int * );
217    int (* MapType)( AstKeyMap *, const char *, int * );
218    int (* MapHasKey)( AstKeyMap *, const char *, int * );
219    int (* MapDefined)( AstKeyMap *, const char *, int * );
220    const char *(* MapIterate)( AstKeyMap *, int, int * );
221    const char *(* MapKey)( AstKeyMap *, int, int * );
222 
223    int (* GetSizeGuess)( AstKeyMap *, int * );
224    int (* TestSizeGuess)( AstKeyMap *, int * );
225    void (* SetSizeGuess)( AstKeyMap *, int, int * );
226    void (* ClearSizeGuess)( AstKeyMap *, int * );
227 
228    int (* GetMapLocked)( AstKeyMap *, int * );
229    int (* TestMapLocked)( AstKeyMap *, int * );
230    void (* ClearMapLocked)( AstKeyMap *, int * );
231    void (* SetMapLocked)( AstKeyMap *, int, int * );
232 
233    int (* GetKeyError)( AstKeyMap *, int * );
234    int (* TestKeyError)( AstKeyMap *, int * );
235    void (* ClearKeyError)( AstKeyMap *, int * );
236    void (* SetKeyError)( AstKeyMap *, int, int * );
237 
238    int (* GetKeyCase)( AstKeyMap *, int * );
239    int (* TestKeyCase)( AstKeyMap *, int * );
240    void (* ClearKeyCase)( AstKeyMap *, int * );
241    void (* SetKeyCase)( AstKeyMap *, int, int * );
242 
243    int (* GetSortBy)( AstKeyMap *, int * );
244    int (* TestSortBy)( AstKeyMap *, int * );
245    void (* ClearSortBy)( AstKeyMap *, int * );
246    void (* SetSortBy)( AstKeyMap *, int, int * );
247 
248 } AstKeyMapVtab;
249 
250 #if defined(THREAD_SAFE)
251 
252 /* Define a structure holding all data items that are global within this
253    class. */
254 typedef struct AstKeyMapGlobals {
255    AstKeyMapVtab Class_Vtab;
256    int Class_Init;
257    char GetAttrib_Buff[ AST__KEYMAP_GETATTRIB_BUFF_LEN + 1 ];
258    char *ConvertValue_Strings[ AST__KEYMAP_CONVERTVALUE_MAX_STRINGS ];
259    int ConvertValue_Istr;
260    int ConvertValue_Init;
261    char ConvertValue_Buff[ AST__KEYMAP_CONVERTVALUE_BUFF_LEN + 1 ];
262    char *MapKey_Strings[ AST__KEYMAP_MAPKEY_MAX_STRINGS ];
263    int MapKey_Istr;
264    int MapKey_Init;
265 } AstKeyMapGlobals;
266 
267 #endif
268 
269 #endif
270 
271 /* Function prototypes. */
272 /* ==================== */
273 /* Prototypes for standard class functions. */
274 /* ---------------------------------------- */
275 astPROTO_CHECK(KeyMap)          /* Check class membership */
276 astPROTO_ISA(KeyMap)            /* Test class membership */
277 
278 /* Constructor. */
279 #if defined(astCLASS)            /* Protected. */
280 AstKeyMap *astKeyMap_( const char *, int *, ...);
281 #else
282 AstKeyMap *astKeyMapId_( const char *, ... )__attribute__((format(printf,1,2)));
283 #endif
284 
285 #if defined(astCLASS)            /* Protected */
286 
287 /* Initialiser. */
288 AstKeyMap *astInitKeyMap_( void *, size_t, int, AstKeyMapVtab *, const char *, int * );
289 
290 /* Vtab initialiser. */
291 void astInitKeyMapVtab_( AstKeyMapVtab *, const char *, int * );
292 
293 /* Loader. */
294 AstKeyMap *astLoadKeyMap_( void *, size_t, AstKeyMapVtab *, const char *, AstChannel *, int * );
295 
296 /* Thread-safe initialiser for all global data used by this module. */
297 #if defined(THREAD_SAFE)
298 void astInitKeyMapGlobals_( AstKeyMapGlobals * );
299 #endif
300 
301 #endif
302 
303 /* Prototypes for member functions. */
304 /* -------------------------------- */
305 
306 #if defined(astCLASS)            /* Protected */
307 int astMapGet0A_( AstKeyMap *, const char *, AstObject **, int * );
308 int astMapGet1A_( AstKeyMap *, const char *, int, int *, AstObject **, int * );
309 void astMapPut1A_( AstKeyMap *, const char *, int, AstObject *const [], const char *, int * );
310 int astMapGetElemA_( AstKeyMap *, const char *, int, AstObject **, int * );
311 #else
312 int astMapGet0AId_( AstKeyMap *, const char *, AstObject **, int * );
313 int astMapGet1AId_( AstKeyMap *, const char *, int, int *, AstObject **, int * );
314 void astMapPut1AId_( AstKeyMap *, const char *, int, AstObject *const [], const char *, int * );
315 int astMapGetElemAId_( AstKeyMap *, const char *, int, AstObject **, int * );
316 #endif
317 
318 const char *astMapKey_( AstKeyMap *, int, int * );
319 
320 
321 int astMapGet0B_( AstKeyMap *, const char *, unsigned char *, int * );
322 int astMapGet0C_( AstKeyMap *, const char *, const char **, int * );
323 int astMapGet0D_( AstKeyMap *, const char *, double *, int * );
324 int astMapGet0F_( AstKeyMap *, const char *, float *, int * );
325 int astMapGet0I_( AstKeyMap *, const char *, int *, int * );
326 int astMapGet0P_( AstKeyMap *, const char *, void **, int * );
327 int astMapGet0S_( AstKeyMap *, const char *, short int *, int * );
328 int astMapGet1B_( AstKeyMap *, const char *, int, int *, unsigned char *, int * );
329 int astMapGet1C_( AstKeyMap *, const char *, int, int, int *, char *, int * );
330 int astMapGet1D_( AstKeyMap *, const char *, int, int *, double *, int * );
331 int astMapGet1F_( AstKeyMap *, const char *, int, int *, float *, int * );
332 int astMapGet1I_( AstKeyMap *, const char *, int, int *, int *, int * );
333 int astMapGet1P_( AstKeyMap *, const char *, int, int *, void **, int * );
334 int astMapGet1S_( AstKeyMap *, const char *, int, int *, short int *, int * );
335 int astMapGetElemB_( AstKeyMap *, const char *, int, unsigned char *, int * );
336 int astMapGetElemC_( AstKeyMap *, const char *, int, int, char *, int * );
337 int astMapGetElemD_( AstKeyMap *, const char *, int, double *, int * );
338 int astMapGetElemF_( AstKeyMap *, const char *, int, float *, int * );
339 int astMapGetElemI_( AstKeyMap *, const char *, int, int *, int * );
340 int astMapGetElemP_( AstKeyMap *, const char *, int, void **, int * );
341 int astMapGetElemS_( AstKeyMap *, const char *, int, short int *, int * );
342 int astMapHasKey_( AstKeyMap *, const char *, int * );
343 int astMapDefined_( AstKeyMap *, const char *, int * );
344 int astMapLenC_( AstKeyMap *, const char *, int * );
345 int astMapLength_( AstKeyMap *, const char *, int * );
346 int astMapSize_( AstKeyMap *, int * );
347 int astMapType_( AstKeyMap *, const char *, int * );
348 void astMapCopy_( AstKeyMap *, AstKeyMap *, int * );
349 void astMapPut0A_( AstKeyMap *, const char *, AstObject *, const char *, int * );
350 void astMapPut0B_( AstKeyMap *, const char *, unsigned char, const char *, int * );
351 void astMapPut0C_( AstKeyMap *, const char *, const char *, const char *, int * );
352 void astMapPut0D_( AstKeyMap *, const char *, double, const char *, int * );
353 void astMapPut0F_( AstKeyMap *, const char *, float, const char *, int * );
354 void astMapPut0I_( AstKeyMap *, const char *, int, const char *, int * );
355 void astMapPut0P_( AstKeyMap *, const char *, void *, const char *, int * );
356 void astMapPut0S_( AstKeyMap *, const char *, short int, const char *, int * );
357 void astMapPut1B_( AstKeyMap *, const char *, int, const unsigned char[], const char *, int * );
358 void astMapPut1C_( AstKeyMap *, const char *, int, const char *const [], const char *, int * );
359 void astMapPut1D_( AstKeyMap *, const char *, int, const double *, const char *, int * );
360 void astMapPut1F_( AstKeyMap *, const char *, int, const float *, const char *, int * );
361 void astMapPut1I_( AstKeyMap *, const char *, int, const int *, const char *, int * );
362 void astMapPut1P_( AstKeyMap *, const char *, int, void *const [], const char *, int * );
363 void astMapPut1S_( AstKeyMap *, const char *, int, const short int *, const char *, int * );
364 void astMapPutElemA_( AstKeyMap *, const char *, int, AstObject *, int * );
365 void astMapPutElemB_( AstKeyMap *, const char *, int, unsigned char, int * );
366 void astMapPutElemC_( AstKeyMap *, const char *, int, const char *, int * );
367 void astMapPutElemD_( AstKeyMap *, const char *, int, double, int * );
368 void astMapPutElemF_( AstKeyMap *, const char *, int, float, int * );
369 void astMapPutElemI_( AstKeyMap *, const char *, int, int, int * );
370 void astMapPutElemP_( AstKeyMap *, const char *, int, void *, int * );
371 void astMapPutElemS_( AstKeyMap *, const char *, int, short int, int * );
372 void astMapPutU_( AstKeyMap *, const char *, const char *, int * );
373 void astMapRemove_( AstKeyMap *, const char *, int * );
374 void astMapRename_( AstKeyMap *, const char *, const char *, int * );
375 
376 #if defined(astCLASS)            /* Protected */
377 const char *astMapIterate_( AstKeyMap *, int, int * );
378 
379 int astGetSizeGuess_( AstKeyMap *, int * );
380 int astTestSizeGuess_( AstKeyMap *, int * );
381 void astSetSizeGuess_( AstKeyMap *, int, int * );
382 void astClearSizeGuess_( AstKeyMap *, int * );
383 
384 int astGetKeyError_( AstKeyMap *, int * );
385 int astTestKeyError_( AstKeyMap *, int * );
386 void astSetKeyError_( AstKeyMap *, int, int * );
387 void astClearKeyError_( AstKeyMap *, int * );
388 
389 int astGetKeyCase_( AstKeyMap *, int * );
390 int astTestKeyCase_( AstKeyMap *, int * );
391 void astSetKeyCase_( AstKeyMap *, int, int * );
392 void astClearKeyCase_( AstKeyMap *, int * );
393 
394 int astGetSortBy_( AstKeyMap *, int * );
395 int astTestSortBy_( AstKeyMap *, int * );
396 void astSetSortBy_( AstKeyMap *, int, int * );
397 void astClearSortBy_( AstKeyMap *, int * );
398 
399 int astGetMapLocked_( AstKeyMap *, int * );
400 int astTestMapLocked_( AstKeyMap *, int * );
401 void astSetMapLocked_( AstKeyMap *, int, int * );
402 void astClearMapLocked_( AstKeyMap *, int * );
403 #endif
404 
405 /* Function interfaces. */
406 /* ==================== */
407 /* These macros are wrap-ups for the functions defined by this class
408    to make them easier to invoke (e.g. to avoid type mis-matches when
409    passing pointers to objects from derived classes). */
410 
411 /* Interfaces to standard class functions. */
412 /* --------------------------------------- */
413 /* Some of these functions provide validation, so we cannot use them
414    to validate their own arguments. We must use a cast when passing
415    object pointers (so that they can accept objects from derived
416    classes). */
417 
418 /* Check class membership. */
419 #define astCheckKeyMap(this) astINVOKE_CHECK(KeyMap,this,0)
420 #define astVerifyKeyMap(this) astINVOKE_CHECK(KeyMap,this,1)
421 
422 /* Test class membership. */
423 #define astIsAKeyMap(this) astINVOKE_ISA(KeyMap,this)
424 
425 /* Constructor. */
426 #if defined(astCLASS)            /* Protected. */
427 #define astKeyMap astINVOKE(F,astKeyMap_)
428 #else
429 #define astKeyMap astINVOKE(F,astKeyMapId_)
430 #endif
431 
432 #if defined(astCLASS)            /* Protected */
433 
434 /* Initialiser. */
435 #define astInitKeyMap(mem,size,init,vtab,name) astINVOKE(O,astInitKeyMap_(mem,size,init,vtab,name,STATUS_PTR))
436 
437 /* Vtab Initialiser. */
438 #define astInitKeyMapVtab(vtab,name) astINVOKE(V,astInitKeyMapVtab_(vtab,name,STATUS_PTR))
439 /* Loader. */
440 #define astLoadKeyMap(mem,size,vtab,name,channel) \
441 astINVOKE(O,astLoadKeyMap_(mem,size,vtab,name,astCheckChannel(channel),STATUS_PTR))
442 #endif
443 
444 /* Interfaces to public member functions. */
445 /* -------------------------------------- */
446 /* Here we make use of astCheckKeyMap to validate KeyMap pointers
447    before use.  This provides a contextual error report if a pointer
448    to the wrong sort of Object is supplied. */
449 #define astMapPutU(this,key,comment) astINVOKE(V,astMapPutU_(astCheckKeyMap(this),key,comment,STATUS_PTR))
450 #define astMapPut0I(this,key,value,comment) astINVOKE(V,astMapPut0I_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
451 #define astMapPut0B(this,key,value,comment) astINVOKE(V,astMapPut0B_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
452 #define astMapPut0S(this,key,value,comment) astINVOKE(V,astMapPut0S_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
453 #define astMapPut0D(this,key,value,comment) astINVOKE(V,astMapPut0D_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
454 #define astMapPut0F(this,key,value,comment) astINVOKE(V,astMapPut0F_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
455 #define astMapPut0C(this,key,value,comment) astINVOKE(V,astMapPut0C_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
456 #define astMapPut0A(this,key,value,comment) astINVOKE(V,astMapPut0A_(astCheckKeyMap(this),key,astCheckObject(value),comment,STATUS_PTR))
457 #define astMapPut0P(this,key,value,comment) astINVOKE(V,astMapPut0P_(astCheckKeyMap(this),key,value,comment,STATUS_PTR))
458 #define astMapPut1I(this,key,size,value,comment) astINVOKE(V,astMapPut1I_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
459 #define astMapPut1B(this,key,size,value,comment) astINVOKE(V,astMapPut1B_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
460 #define astMapPut1S(this,key,size,value,comment) astINVOKE(V,astMapPut1S_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
461 #define astMapPut1D(this,key,size,value,comment) astINVOKE(V,astMapPut1D_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
462 #define astMapPut1F(this,key,size,value,comment) astINVOKE(V,astMapPut1F_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
463 #define astMapPut1C(this,key,size,value,comment) astINVOKE(V,astMapPut1C_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
464 #define astMapGet0I(this,key,value) astINVOKE(V,astMapGet0I_(astCheckKeyMap(this),key,value,STATUS_PTR))
465 #define astMapGet0B(this,key,value) astINVOKE(V,astMapGet0B_(astCheckKeyMap(this),key,value,STATUS_PTR))
466 #define astMapGet0S(this,key,value) astINVOKE(V,astMapGet0S_(astCheckKeyMap(this),key,value,STATUS_PTR))
467 #define astMapGet0D(this,key,value) astINVOKE(V,astMapGet0D_(astCheckKeyMap(this),key,value,STATUS_PTR))
468 #define astMapGet0F(this,key,value) astINVOKE(V,astMapGet0F_(astCheckKeyMap(this),key,value,STATUS_PTR))
469 #define astMapGet0C(this,key,value) astINVOKE(V,astMapGet0C_(astCheckKeyMap(this),key,value,STATUS_PTR))
470 #define astMapGet1I(this,key,mxval,nval,value) astINVOKE(V,astMapGet1I_(astCheckKeyMap(this),key,mxval,nval,value,STATUS_PTR))
471 #define astMapGet1B(this,key,mxval,nval,value) astINVOKE(V,astMapGet1B_(astCheckKeyMap(this),key,mxval,nval,value,STATUS_PTR))
472 #define astMapGet1S(this,key,mxval,nval,value) astINVOKE(V,astMapGet1S_(astCheckKeyMap(this),key,mxval,nval,value,STATUS_PTR))
473 #define astMapGet1D(this,key,mxval,nval,value) astINVOKE(V,astMapGet1D_(astCheckKeyMap(this),key,mxval,nval,value,STATUS_PTR))
474 #define astMapGet1F(this,key,mxval,nval,value) astINVOKE(V,astMapGet1F_(astCheckKeyMap(this),key,mxval,nval,value,STATUS_PTR))
475 #define astMapGet1C(this,key,l,mxval,nval,value) astINVOKE(V,astMapGet1C_(astCheckKeyMap(this),key,l,mxval,nval,value,STATUS_PTR))
476 #define astMapGetElemI(this,key,elem,value) astINVOKE(V,astMapGetElemI_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
477 #define astMapGetElemB(this,key,elem,value) astINVOKE(V,astMapGetElemB_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
478 #define astMapGetElemS(this,key,elem,value) astINVOKE(V,astMapGetElemS_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
479 #define astMapGetElemD(this,key,elem,value) astINVOKE(V,astMapGetElemD_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
480 #define astMapGetElemF(this,key,elem,value) astINVOKE(V,astMapGetElemF_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
481 #define astMapGetElemC(this,key,l,elem,value) astINVOKE(V,astMapGetElemC_(astCheckKeyMap(this),key,l,elem,value,STATUS_PTR))
482 #define astMapGetElemP(this,key,elem,value) astINVOKE(V,astMapGetElemP_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
483 #define astMapPutElemA(this,key,elem,value) astINVOKE(V,astMapPutElemA_(astCheckKeyMap(this),key,elem,astCheckObject(value),STATUS_PTR))
484 #define astMapPutElemI(this,key,elem,value) astINVOKE(V,astMapPutElemI_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
485 #define astMapPutElemB(this,key,elem,value) astINVOKE(V,astMapPutElemB_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
486 #define astMapPutElemS(this,key,elem,value) astINVOKE(V,astMapPutElemS_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
487 #define astMapPutElemD(this,key,elem,value) astINVOKE(V,astMapPutElemD_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
488 #define astMapPutElemF(this,key,elem,value) astINVOKE(V,astMapPutElemF_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
489 #define astMapPutElemC(this,key,elem,value) astINVOKE(V,astMapPutElemC_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
490 #define astMapPutElemP(this,key,elem,value) astINVOKE(V,astMapPutElemP_(astCheckKeyMap(this),key,elem,value,STATUS_PTR))
491 #define astMapRemove(this,key) astINVOKE(V,astMapRemove_(astCheckKeyMap(this),key,STATUS_PTR))
492 #define astMapRename(this,oldkey,newkey) astINVOKE(V,astMapRename_(astCheckKeyMap(this),oldkey,newkey,STATUS_PTR))
493 #define astMapCopy(this,that) astINVOKE(V,astMapCopy_(astCheckKeyMap(this),astCheckKeyMap(that),STATUS_PTR))
494 #define astMapSize(this) astINVOKE(V,astMapSize_(astCheckKeyMap(this),STATUS_PTR))
495 #define astMapLength(this,key) astINVOKE(V,astMapLength_(astCheckKeyMap(this),key,STATUS_PTR))
496 #define astMapLenC(this,key) astINVOKE(V,astMapLenC_(astCheckKeyMap(this),key,STATUS_PTR))
497 #define astMapHasKey(this,key) astINVOKE(V,astMapHasKey_(astCheckKeyMap(this),key,STATUS_PTR))
498 #define astMapDefined(this,key) astINVOKE(V,astMapDefined_(astCheckKeyMap(this),key,STATUS_PTR))
499 #define astMapKey(this,index) astINVOKE(V,astMapKey_(astCheckKeyMap(this),index,STATUS_PTR))
500 #define astMapType(this,key) astINVOKE(V,astMapType_(astCheckKeyMap(this),key,STATUS_PTR))
501 #define astMapGet0P(this,key,value) astINVOKE(V,astMapGet0P_(astCheckKeyMap(this),key,value,STATUS_PTR))
502 #define astMapGet1P(this,key,mxval,nval,value) astINVOKE(V,astMapGet1P_(astCheckKeyMap(this),key,mxval,nval,value,STATUS_PTR))
503 #define astMapPut1P(this,key,size,value,comment) astINVOKE(V,astMapPut1P_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
504 
505 #if defined(astCLASS)            /* Protected */
506 #define astMapGet0A(this,key,value) astINVOKE(V,astMapGet0A_(astCheckKeyMap(this),key,(AstObject **)(value),STATUS_PTR))
507 #define astMapGet1A(this,key,mxval,nval,value) astINVOKE(V,astMapGet1A_(astCheckKeyMap(this),key,mxval,nval,(AstObject **)(value),STATUS_PTR))
508 #define astMapPut1A(this,key,size,value,comment) astINVOKE(V,astMapPut1A_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
509 #define astMapGetElemA(this,key,elem,value) astINVOKE(V,astMapGetElemA_(astCheckKeyMap(this),key,elem,(AstObject **)(value),STATUS_PTR))
510 #define astMapIterate(this,reset) astINVOKE(V,astMapIterate_(astCheckKeyMap(this),reset,STATUS_PTR))
511 
512 #define astClearSizeGuess(this) \
513 astINVOKE(V,astClearSizeGuess_(astCheckKeyMap(this),STATUS_PTR))
514 #define astGetSizeGuess(this) \
515 astINVOKE(V,astGetSizeGuess_(astCheckKeyMap(this),STATUS_PTR))
516 #define astSetSizeGuess(this,sizeguess) \
517 astINVOKE(V,astSetSizeGuess_(astCheckKeyMap(this),sizeguess,STATUS_PTR))
518 #define astTestSizeGuess(this) \
519 astINVOKE(V,astTestSizeGuess_(astCheckKeyMap(this),STATUS_PTR))
520 
521 #define astClearKeyError(this) \
522 astINVOKE(V,astClearKeyError_(astCheckKeyMap(this),STATUS_PTR))
523 #define astGetKeyError(this) \
524 astINVOKE(V,astGetKeyError_(astCheckKeyMap(this),STATUS_PTR))
525 #define astSetKeyError(this,keyerror) \
526 astINVOKE(V,astSetKeyError_(astCheckKeyMap(this),keyerror,STATUS_PTR))
527 #define astTestKeyError(this) \
528 astINVOKE(V,astTestKeyError_(astCheckKeyMap(this),STATUS_PTR))
529 
530 #define astClearKeyCase(this) \
531 astINVOKE(V,astClearKeyCase_(astCheckKeyMap(this),STATUS_PTR))
532 #define astGetKeyCase(this) \
533 astINVOKE(V,astGetKeyCase_(astCheckKeyMap(this),STATUS_PTR))
534 #define astSetKeyCase(this,keycase) \
535 astINVOKE(V,astSetKeyCase_(astCheckKeyMap(this),keycase,STATUS_PTR))
536 #define astTestKeyCase(this) \
537 astINVOKE(V,astTestKeyCase_(astCheckKeyMap(this),STATUS_PTR))
538 
539 #define astClearSortBy(this) \
540 astINVOKE(V,astClearSortBy_(astCheckKeyMap(this),STATUS_PTR))
541 #define astGetSortBy(this) \
542 astINVOKE(V,astGetSortBy_(astCheckKeyMap(this),STATUS_PTR))
543 #define astSetSortBy(this,sortby) \
544 astINVOKE(V,astSetSortBy_(astCheckKeyMap(this),sortby,STATUS_PTR))
545 #define astTestSortBy(this) \
546 astINVOKE(V,astTestSortBy_(astCheckKeyMap(this),STATUS_PTR))
547 
548 #define astClearMapLocked(this) \
549 astINVOKE(V,astClearMapLocked_(astCheckKeyMap(this),STATUS_PTR))
550 #define astGetMapLocked(this) \
551 astINVOKE(V,astGetMapLocked_(astCheckKeyMap(this),STATUS_PTR))
552 #define astSetMapLocked(this,maplocked) \
553 astINVOKE(V,astSetMapLocked_(astCheckKeyMap(this),maplocked,STATUS_PTR))
554 #define astTestMapLocked(this) \
555 astINVOKE(V,astTestMapLocked_(astCheckKeyMap(this),STATUS_PTR))
556 
557 
558 #else
559 #define astMapGet0A(this,key,value) astINVOKE(V,astMapGet0AId_(astCheckKeyMap(this),key,(AstObject **)(value),STATUS_PTR))
560 #define astMapGet1A(this,key,mxval,nval,value) astINVOKE(V,astMapGet1AId_(astCheckKeyMap(this),key,mxval,nval,(AstObject **)(value),STATUS_PTR))
561 #define astMapPut1A(this,key,size,value,comment) astINVOKE(V,astMapPut1AId_(astCheckKeyMap(this),key,size,value,comment,STATUS_PTR))
562 #define astMapGetElemA(this,key,elem,value) astINVOKE(V,astMapGetElemAId_(astCheckKeyMap(this),key,elem,(AstObject **)(value),STATUS_PTR))
563 #endif
564 
565 #endif
566 
567