1 #if !defined( REGION_INCLUDED ) /* Include this file only once */
2 #define REGION_INCLUDED
3 /*
4 *+
5 *  Name:
6 *     region.h
7 
8 *  Type:
9 *     C include file.
10 
11 *  Purpose:
12 *     Define the interface to the Region class.
13 
14 *  Invocation:
15 *     #include "region.h"
16 
17 *  Description:
18 *     This include file defines the interface to the Region class and
19 *     provides the type definitions, function prototypes and macros, etc.
20 *     needed to use this class.
21 
22 *  Inheritance:
23 *     The Region class inherits from the Frame class.
24 
25 *  Feature Test Macros:
26 *     astCLASS
27 *        If the astCLASS macro is undefined, only public symbols are
28 *        made available, otherwise protected symbols (for use in other
29 *        class implementations) are defined. This macro also affects
30 *        the reporting of error context information, which is only
31 *        provided for external calls to the AST library.
32 
33 *  Copyright:
34 *     Copyright (C) 1997-2006 Council for the Central Laboratory of the
35 *     Research Councils
36 
37 *  Licence:
38 *     This program is free software: you can redistribute it and/or
39 *     modify it under the terms of the GNU Lesser General Public
40 *     License as published by the Free Software Foundation, either
41 *     version 3 of the License, or (at your option) any later
42 *     version.
43 *
44 *     This program is distributed in the hope that it will be useful,
45 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
46 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
47 *     GNU Lesser General Public License for more details.
48 *
49 *     You should have received a copy of the GNU Lesser General
50 *     License along with this program.  If not, see
51 *     <http://www.gnu.org/licenses/>.
52 
53 *  Authors:
54 *     DSB: David S. Berry (Starlink)
55 
56 *  History:
57 *     5-DEC-2003 (DSB):
58 *        Original version.
59 *     2-MAR-2006 (DSB):
60 *        Changed AST_LONG_DOUBLE to HAVE_LONG_DOUBLE.
61 *-
62 */
63 
64 /* Include files. */
65 /* ============== */
66 /* Interface definitions. */
67 /* ---------------------- */
68 #include "frame.h"               /* Parent Frame class */
69 
70 /* Macros. */
71 /* ======= */
72 
73 /* Type Definitions. */
74 /* ================= */
75 /* Region structure. */
76 /* ------------------- */
77 /* This structure contains all information that is unique to each object in
78    the class (e.g. its instance variables). */
79 #if defined(astCLASS) || defined(astFORTRAN77)
80 #define STATUS_PTR status
81 #else
82 #define STATUS_PTR astGetStatusPtr
83 #endif
84 
85 typedef struct AstRegion {
86 
87 /* Attributes inherited from the parent class. */
88    AstFrame parent;           /* Parent class structure */
89 
90 /* Attributes specific to objects in this class. */
91    AstFrameSet *frameset;     /* FrameSet holding original and current Frames */
92    AstPointSet *points;       /* Points defining region location and extent */
93    struct AstRegion *unc;     /* Region specifying position uncertainties */
94    double fillfactor;         /* Fill factor (0.0->1.0) */
95    int regionfs;              /* Include FrameSet in dump? */
96    int negated;               /* Has the Region been negated? */
97    int closed;                /* Is the boundary part of the Region? */
98    int meshsize;              /* No. of points on boundary mesh */
99    struct AstRegion *defunc;  /* Default uncertainty Region */
100    AstPointSet *basemesh;     /* Base frame mesh covering the boundary */
101    AstPointSet *basegrid;     /* Base frame grid covering the boundary */
102    int adaptive;              /* Does the Region adapt to coord sys changes? */
103    int nomap;                 /* Ignore the Region's FrameSet? */
104    struct AstRegion *negation;/* Negated copy of "this" */
105 } AstRegion;
106 
107 /* Virtual function table. */
108 /* ----------------------- */
109 /* This table contains all information that is the same for all objects in the
110    class (e.g. pointers to its virtual functions). */
111 #if defined(astCLASS)            /* Protected */
112 typedef struct AstRegionVtab {
113 
114 /* Properties (e.g. methods) inherited from the parent class. */
115    AstFrameVtab frame_vtab;      /* Parent class virtual function table */
116 
117 /* A Unique identifier to determine class membership. */
118    AstClassIdentifier id;
119 
120 /* Properties (e.g. methods) specific to this class. */
121    int (* Overlap)( AstRegion *, AstRegion *, int * );
122    int (* OverlapX)( AstRegion *, AstRegion *, int * );
123    AstRegion *(* MapRegion)( AstRegion *, AstMapping *, AstFrame *, int * );
124    AstFrame *(* GetRegionFrame)( AstRegion *, int * );
125    AstFrameSet *(* GetRegionFrameSet)( AstRegion *, int * );
126    AstFrame *(* RegFrame)( AstRegion *, int * );
127    AstFrameSet *(* GetRegFS)( AstRegion *, int * );
128    AstPointSet *(* RegTransform)( AstRegion *, AstPointSet *, int, AstPointSet *, AstFrame **, int * );
129    AstPointSet *(* BTransform)( AstRegion *, AstPointSet *, int, AstPointSet *, int * );
130    void (* Negate)( AstRegion *, int * );
131    void (* RegBaseBox)( AstRegion *, double *, double *, int * );
132    void (* RegBaseBox2)( AstRegion *, double *, double *, int * );
133    void (* RegSetAttrib)( AstRegion *, const char *, char **, int * );
134    void (* RegClearAttrib)( AstRegion *, const char *, char **, int * );
135    void (* GetRegionBounds)( AstRegion *, double *, double *, int * );
136    void (* ShowMesh)( AstRegion *, int, const char *, int * );
137    void (* GetRegionBounds2)( AstRegion *, double *, double *, int * );
138    void (* ClearUnc)( AstRegion *, int * );
139    void (* RegOverlay)( AstRegion *, AstRegion *, int, int * );
140    void (* GetRegionMesh)( AstRegion *, int, int, int, int *, double *, int * );
141    void (* GetRegionPoints)( AstRegion *, int, int, int *, double *, int * );
142    int (* GetBounded)( AstRegion *, int * );
143    int (* TestUnc)( AstRegion *, int * );
144    int (* RegDummyFS)( AstRegion *, int * );
145    int (* RegPins)( AstRegion *, AstPointSet *, AstRegion *, int **, int * );
146    AstMapping *(* RegMapping)( AstRegion *, int * );
147    AstPointSet *(* RegMesh)( AstRegion *, int * );
148    AstPointSet *(* RegGrid)( AstRegion *, int * );
149    AstPointSet *(* RegBaseMesh)( AstRegion *, int * );
150    AstPointSet *(* RegBaseGrid)( AstRegion *, int * );
151    AstRegion **(* RegSplit)( AstRegion *, int *, int * );
152    AstPointSet *(* BndBaseMesh)( AstRegion *, double *, double *, int * );
153    AstPointSet *(* BndMesh)( AstRegion *, double *, double *, int * );
154    AstRegion *(* GetNegation)( AstRegion *, int * );
155    AstRegion *(* GetUncFrm)( AstRegion *, int, int * );
156    AstRegion *(* GetUnc)( AstRegion *, int, int * );
157    AstRegion *(* GetDefUnc)( AstRegion *, int * );
158    AstRegion *(* RegBasePick)( AstRegion *this, int, const int *, int * );
159    void (* ResetCache)( AstRegion *, int * );
160    int (* RegTrace)( AstRegion *, int, double *, double **, int * );
161    void (* SetUnc)( AstRegion *, AstRegion *, int * );
162    void (* SetRegFS)( AstRegion *, AstFrame *, int * );
163    double *(* RegCentre)( AstRegion *, double *, double **, int, int, int * );
164 
165 #if HAVE_LONG_DOUBLE     /* Not normally implemented */
166    int (* MaskLD)( AstRegion *, AstMapping *, int, int, const int[], const int ubnd[], long double [], long double, int * );
167 #endif
168    int (* MaskB)( AstRegion *, AstMapping *, int, int, const int[], const int[], signed char[], signed char, int * );
169    int (* MaskD)( AstRegion *, AstMapping *, int, int, const int[], const int[], double[], double, int * );
170    int (* MaskF)( AstRegion *, AstMapping *, int, int, const int[], const int[], float[], float, int * );
171    int (* MaskI)( AstRegion *, AstMapping *, int, int, const int[], const int[], int[], int, int * );
172    int (* MaskL)( AstRegion *, AstMapping *, int, int, const int[], const int[], long int[], long int, int * );
173    int (* MaskS)( AstRegion *, AstMapping *, int, int, const int[], const int[], short int[], short int, int * );
174    int (* MaskUB)( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned char[], unsigned char, int * );
175    int (* MaskUI)( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned int[], unsigned int, int * );
176    int (* MaskUL)( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned long int[], unsigned long int, int * );
177    int (* MaskUS)( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned short int[], unsigned short int, int * );
178 
179    int (* GetNegated)( AstRegion *, int * );
180    int (* TestNegated)( AstRegion *, int * );
181    void (* ClearNegated)( AstRegion *, int * );
182    void (* SetNegated)( AstRegion *, int, int * );
183 
184    int (* GetRegionFS)( AstRegion *, int * );
185    int (* TestRegionFS)( AstRegion *, int * );
186    void (* ClearRegionFS)( AstRegion *, int * );
187    void (* SetRegionFS)( AstRegion *, int, int * );
188 
189    int (* GetClosed)( AstRegion *, int * );
190    int (* TestClosed)( AstRegion *, int * );
191    void (* ClearClosed)( AstRegion *, int * );
192    void (* SetClosed)( AstRegion *, int, int * );
193 
194    int (* GetMeshSize)( AstRegion *, int * );
195    int (* TestMeshSize)( AstRegion *, int * );
196    void (* ClearMeshSize)( AstRegion *, int * );
197    void (* SetMeshSize)( AstRegion *, int, int * );
198 
199    double (* GetFillFactor)( AstRegion *, int * );
200    int (* TestFillFactor)( AstRegion *, int * );
201    void (* ClearFillFactor)( AstRegion *, int * );
202    void (* SetFillFactor)( AstRegion *, double, int * );
203 
204    int (* GetAdaptive)( AstRegion *, int * );
205    int (* TestAdaptive)( AstRegion *, int * );
206    void (* ClearAdaptive)( AstRegion *, int * );
207    void (* SetAdaptive)( AstRegion *, int, int * );
208 
209 } AstRegionVtab;
210 #if defined(THREAD_SAFE)
211 
212 /* Define a structure holding all data items that are global within this
213    class. */
214 typedef struct AstRegionGlobals {
215    AstRegionVtab Class_Vtab;
216    int Class_Init;
217    char GetAttrib_Buff[ 101 ];
218 } AstRegionGlobals;
219 
220 #endif
221 #endif
222 
223 /* Function prototypes. */
224 /* ==================== */
225 /* Prototypes for standard class functions. */
226 /* ---------------------------------------- */
227 astPROTO_CHECK(Region)         /* Check class membership */
228 astPROTO_ISA(Region)           /* Test class membership */
229 
230 #if defined(astCLASS)            /* Protected */
231 
232 /* Initialiser. */
233 AstRegion *astInitRegion_( void *, size_t, int, AstRegionVtab *, const char *,
234                            AstFrame *, AstPointSet *, AstRegion *, int * );
235 
236 /* Vtab initialiser. */
237 void astInitRegionVtab_( AstRegionVtab *, const char *, int * );
238 
239 /* Loader. */
240 AstRegion *astLoadRegion_( void *, size_t, AstRegionVtab *,
241                            const char *, AstChannel *, int * );
242 
243 /* Thread-safe initialiser for all global data used by this module. */
244 #if defined(THREAD_SAFE)
245 void astInitRegionGlobals_( AstRegionGlobals * );
246 #endif
247 
248 #endif
249 
250 /* Prototypes for member functions. */
251 /* -------------------------------- */
252 
253 AstFrame *astGetRegionFrame_( AstRegion *, int * );
254 AstFrameSet *astGetRegionFrameSet_( AstRegion *, int * );
255 int astOverlap_( AstRegion *, AstRegion *, int * );
256 void astNegate_( AstRegion *, int * );
257 
258 #if HAVE_LONG_DOUBLE     /* Not normally implemented */
259 int astMaskLD_( AstRegion *, AstMapping *, int, int, const int[], const int[], long double [], long double, int * );
260 #endif
261 int astMaskB_( AstRegion *, AstMapping *, int, int, const int[], const int[], signed char[], signed char, int * );
262 int astMaskD_( AstRegion *, AstMapping *, int, int, const int[], const int[], double[], double, int * );
263 int astMaskF_( AstRegion *, AstMapping *, int, int, const int[], const int[], float[], float, int * );
264 int astMaskI_( AstRegion *, AstMapping *, int, int, const int[], const int[], int[], int, int * );
265 int astMaskL_( AstRegion *, AstMapping *, int, int, const int[], const int[], long int[], long int, int * );
266 int astMaskS_( AstRegion *, AstMapping *, int, int, const int[], const int[], short int[], short int, int * );
267 int astMaskUB_( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned char[], unsigned char, int * );
268 int astMaskUI_( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned int[], unsigned int, int * );
269 int astMaskUL_( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned long int[], unsigned long int, int * );
270 int astMaskUS_( AstRegion *, AstMapping *, int, int, const int[], const int[], unsigned short int[], unsigned short int, int * );
271 void astSetUnc_( AstRegion *, AstRegion *, int * );
272 AstRegion *astGetNegation_( AstRegion *, int * );
273 AstRegion *astGetUnc_( AstRegion *, int, int * );
274 void astGetRegionBounds_( AstRegion *, double *, double *, int * );
275 void astShowMesh_( AstRegion *, int, const char *, int * );
276 void astGetRegionMesh_( AstRegion *, int, int, int, int *, double *, int * );
277 void astGetRegionPoints_( AstRegion *, int, int, int *, double *, int * );
278 
279 #if defined(astCLASS)            /* Protected */
280 void astGetRegionBounds2_( AstRegion *, double *, double *, int * );
281 AstRegion *astMapRegion_( AstRegion *, AstMapping *, AstFrame *, int * );
282 AstFrame *astRegFrame_( AstRegion *, int * );
283 AstPointSet *astRegTransform_( AstRegion *, AstPointSet *, int, AstPointSet *, AstFrame **, int * );
284 AstPointSet *astBTransform_( AstRegion *, AstPointSet *, int, AstPointSet *, int * );
285 void astRegBaseBox_( AstRegion *, double *, double *, int * );
286 void astRegBaseBox2_( AstRegion *, double *, double *, int * );
287 void astRegSetAttrib_( AstRegion *, const char *, char **, int * );
288 void astRegClearAttrib_( AstRegion *, const char *, char **, int * );
289 void astClearUnc_( AstRegion *, int * );
290 void astRegOverlay_( AstRegion *, AstRegion *, int, int * );
291 int astGetBounded_( AstRegion *, int * );
292 int astTestUnc_( AstRegion *, int * );
293 int astRegDummyFS_( AstRegion *, int * );
294 int astRegPins_( AstRegion *, AstPointSet *, AstRegion *, int **, int * );
295 AstMapping *astRegMapping_( AstRegion *, int * );
296 AstPointSet *astRegMesh_( AstRegion *, int * );
297 AstPointSet *astRegGrid_( AstRegion *, int * );
298 AstPointSet *astRegBaseMesh_( AstRegion *, int * );
299 AstPointSet *astRegBaseGrid_( AstRegion *, int * );
300 AstPointSet *astBndBaseMesh_( AstRegion *, double *, double *, int * );
301 AstRegion **astRegSplit_( AstRegion *, int *, int * );
302 AstPointSet *astBndMesh_( AstRegion *, double *, double *, int * );
303 AstRegion *astGetUncFrm_( AstRegion *, int, int * );
304 AstRegion *astGetDefUnc_( AstRegion *, int * );
305 AstRegion *astRegBasePick_( AstRegion *this, int, const int *, int * );
306 int astOverlapX_( AstRegion *, AstRegion *, int * );
307 AstFrameSet *astGetRegFS_( AstRegion *, int * );
308 void astSetRegFS_( AstRegion *, AstFrame *, int * );
309 double *astRegCentre_( AstRegion *, double *, double **, int, int, int * );
310 double *astRegTranPoint_( AstRegion *, double *, int, int, int * );
311 void astResetCache_( AstRegion *, int * );
312 int astRegTrace_( AstRegion *, int, double *, double **, int * );
313 
314 int astGetNegated_( AstRegion *, int * );
315 int astTestNegated_( AstRegion *, int * );
316 void astClearNegated_( AstRegion *, int * );
317 void astSetNegated_( AstRegion *, int, int * );
318 
319 int astGetRegionFS_( AstRegion *, int * );
320 int astTestRegionFS_( AstRegion *, int * );
321 void astClearRegionFS_( AstRegion *, int * );
322 void astSetRegionFS_( AstRegion *, int, int * );
323 
324 int astGetMeshSize_( AstRegion *, int * );
325 int astTestMeshSize_( AstRegion *, int * );
326 void astClearMeshSize_( AstRegion *, int * );
327 void astSetMeshSize_( AstRegion *, int, int * );
328 
329 int astGetClosed_( AstRegion *, int * );
330 int astTestClosed_( AstRegion *, int * );
331 void astClearClosed_( AstRegion *, int * );
332 void astSetClosed_( AstRegion *, int, int * );
333 
334 double astGetFillFactor_( AstRegion *, int * );
335 int astTestFillFactor_( AstRegion *, int * );
336 void astClearFillFactor_( AstRegion *, int * );
337 void astSetFillFactor_( AstRegion *, double, int * );
338 
339 int astGetAdaptive_( AstRegion *, int * );
340 int astTestAdaptive_( AstRegion *, int * );
341 void astClearAdaptive_( AstRegion *, int * );
342 void astSetAdaptive_( AstRegion *, int, int * );
343 
344 #else   /* Public only */
345 AstRegion *astMapRegionId_( AstRegion *, AstMapping *, AstFrame *, int * );
346 
347 #endif
348 
349 /* Function interfaces. */
350 /* ==================== */
351 /* These macros are wrap-ups for the functions defined by this class to make
352    them easier to invoke (e.g. to avoid type mis-matches when passing pointers
353    to objects from derived classes). */
354 
355 /* Interfaces to standard class functions. */
356 /* --------------------------------------- */
357 /* Some of these functions provide validation, so we cannot use them to
358    validate their own arguments. We must use a cast when passing object
359    pointers (so that they can accept objects from derived classes). */
360 
361 /* Check class membership. */
362 #define astCheckRegion(this) astINVOKE_CHECK(Region,this,0)
363 #define astVerifyRegion(this) astINVOKE_CHECK(Region,this,1)
364 
365 /* Test class membership. */
366 #define astIsARegion(this) astINVOKE_ISA(Region,this)
367 
368 #if defined(astCLASS)            /* Protected */
369 
370 /* Initialiser. */
371 #define astInitRegion(mem,size,init,vtab,name,frame,pset,acc)\
372 astINVOKE(O,astInitRegion_(mem,size,init,vtab,name,astCheckFrame(frame),pset,acc,STATUS_PTR))
373 
374 /* Vtab Initialiser. */
375 #define astInitRegionVtab(vtab,name) astINVOKE(V,astInitRegionVtab_(vtab,name,STATUS_PTR))
376 /* Loader. */
377 #define astLoadRegion(mem,size,vtab,name,channel) \
378 astINVOKE(O,astLoadRegion_(mem,size,vtab,name,astCheckChannel(channel),STATUS_PTR))
379 #endif
380 
381 /* Interfaces to public member functions. */
382 /* -------------------------------------- */
383 /* Here we make use of astCheckRegion to validate Region pointers before
384    use. This provides a contextual error report if a pointer to the wrong sort
385    of object is supplied. */
386 #define astGetRegionFrame(this) \
387 astINVOKE(O,astGetRegionFrame_(astCheckRegion(this),STATUS_PTR))
388 #define astGetRegionFrameSet(this) \
389 astINVOKE(O,astGetRegionFrameSet_(astCheckRegion(this),STATUS_PTR))
390 #define astNegate(this) \
391 astINVOKE(V,astNegate_(astCheckRegion(this),STATUS_PTR))
392 #define astOverlap(this,that) \
393 astINVOKE(V,astOverlap_(astCheckRegion(this),astCheckRegion(that),STATUS_PTR))
394 
395 #if HAVE_LONG_DOUBLE     /* Not normally implemented */
396 #define astMaskLD(this,map,inside,ndim,lbnd,ubnd,in,val) \
397 astINVOKE(V,astMaskLD_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
398 #endif
399 
400 #define astMaskB(this,map,inside,ndim,lbnd,ubnd,in,val) \
401 astINVOKE(V,astMaskB_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
402 #define astMaskD(this,map,inside,ndim,lbnd,ubnd,in,val) \
403 astINVOKE(V,astMaskD_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
404 #define astMaskF(this,map,inside,ndim,lbnd,ubnd,in,val) \
405 astINVOKE(V,astMaskF_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
406 #define astMaskI(this,map,inside,ndim,lbnd,ubnd,in,val) \
407 astINVOKE(V,astMaskI_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
408 #define astMaskL(this,map,inside,ndim,lbnd,ubnd,in,val) \
409 astINVOKE(V,astMaskL_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
410 #define astMaskS(this,map,inside,ndim,lbnd,ubnd,in,val) \
411 astINVOKE(V,astMaskS_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
412 #define astMaskUB(this,map,inside,ndim,lbnd,ubnd,in,val) \
413 astINVOKE(V,astMaskUB_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
414 #define astMaskUI(this,map,inside,ndim,lbnd,ubnd,in,val) \
415 astINVOKE(V,astMaskUI_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
416 #define astMaskUL(this,map,inside,ndim,lbnd,ubnd,in,val) \
417 astINVOKE(V,astMaskUL_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
418 #define astMaskUS(this,map,inside,ndim,lbnd,ubnd,in,val) \
419 astINVOKE(V,astMaskUS_(astCheckRegion(this),(map?astCheckMapping(map):NULL),inside,ndim,lbnd,ubnd,in,val,STATUS_PTR))
420 #define astSetUnc(this,unc) astINVOKE(V,astSetUnc_(astCheckRegion(this),unc?astCheckRegion(unc):NULL,STATUS_PTR))
421 #define astGetUnc(this,def) astINVOKE(O,astGetUnc_(astCheckRegion(this),def,STATUS_PTR))
422 #define astGetRegionBounds(this,lbnd,ubnd) astINVOKE(V,astGetRegionBounds_(astCheckRegion(this),lbnd,ubnd,STATUS_PTR))
423 #define astShowMesh(this,format,ttl) astINVOKE(V,astShowMesh_(astCheckRegion(this),format,ttl,STATUS_PTR))
424 #define astGetRegionMesh(this,surface,maxpoint,maxcoord,npoint,points) \
425 astINVOKE(V,astGetRegionMesh_(astCheckRegion(this),surface,maxpoint,maxcoord,npoint,points,STATUS_PTR))
426 #define astGetRegionPoints(this,maxpoint,maxcoord,npoint,points) \
427 astINVOKE(V,astGetRegionPoints_(astCheckRegion(this),maxpoint,maxcoord,npoint,points,STATUS_PTR))
428 
429 /* Interfaces to protected member functions. */
430 /* ----------------------------------------- */
431 #if defined(astCLASS)            /* Protected */
432 
433 #define astGetNegation(this) astINVOKE(O,astGetNegation_(astCheckRegion(this),STATUS_PTR))
434 #define astGetRegionBounds2(this,lbnd,ubnd) astINVOKE(V,astGetRegionBounds2_(astCheckRegion(this),lbnd,ubnd,STATUS_PTR))
435 #define astClearUnc(this) astINVOKE(V,astClearUnc_(astCheckRegion(this),STATUS_PTR))
436 #define astGetBounded(this) astINVOKE(V,astGetBounded_(astCheckRegion(this),STATUS_PTR))
437 #define astGetUncFrm(this,ifrm) astINVOKE(O,astGetUncFrm_(astCheckRegion(this),ifrm,STATUS_PTR))
438 #define astGetDefUnc(this) astINVOKE(O,astGetDefUnc_(astCheckRegion(this),STATUS_PTR))
439 #define astMapRegion(this,map,frame) astINVOKE(O,astMapRegion_(astCheckRegion(this),astCheckMapping(map),astCheckFrame(frame),STATUS_PTR))
440 #define astOverlapX(that,this) astINVOKE(V,astOverlapX_(astCheckRegion(that),astCheckRegion(this),STATUS_PTR))
441 #define astRegBaseBox(this,lbnd,ubnd) astINVOKE(V,astRegBaseBox_(astCheckRegion(this),lbnd,ubnd,STATUS_PTR))
442 #define astRegBaseBox2(this,lbnd,ubnd) astINVOKE(V,astRegBaseBox2_(astCheckRegion(this),lbnd,ubnd,STATUS_PTR))
443 #define astRegSetAttrib(this,setting,bset) astINVOKE(V,astRegSetAttrib_(astCheckRegion(this),setting,bset,STATUS_PTR))
444 #define astRegClearAttrib(this,setting,batt) astINVOKE(V,astRegClearAttrib_(astCheckRegion(this),setting,batt,STATUS_PTR))
445 #define astRegBaseMesh(this) astINVOKE(O,astRegBaseMesh_(astCheckRegion(this),STATUS_PTR))
446 #define astRegBasePick(this,naxes,axes) astINVOKE(O,astRegBasePick_(astCheckRegion(this),naxes,axes,STATUS_PTR))
447 #define astRegBaseGrid(this) astINVOKE(O,astRegBaseGrid_(astCheckRegion(this),STATUS_PTR))
448 #define astRegSplit(this,nlist) astINVOKE(V,astRegSplit_(astCheckRegion(this),nlist,STATUS_PTR))
449 #define astBndBaseMesh(this,lbnd,ubnd) astINVOKE(O,astBndBaseMesh_(astCheckRegion(this),lbnd,ubnd,STATUS_PTR))
450 #define astBndMesh(this,lbnd,ubnd) astINVOKE(O,astBndMesh_(astCheckRegion(this),lbnd,ubnd,STATUS_PTR))
451 #define astRegCentre(this,cen,ptr,index,ifrm) astINVOKE(V,astRegCentre_(astCheckRegion(this),cen,ptr,index,ifrm,STATUS_PTR))
452 #define astRegFrame(this) astINVOKE(O,astRegFrame_(astCheckRegion(this),STATUS_PTR))
453 #define astRegGrid(this) astINVOKE(O,astRegGrid_(astCheckRegion(this),STATUS_PTR))
454 #define astRegMesh(this) astINVOKE(O,astRegMesh_(astCheckRegion(this),STATUS_PTR))
455 #define astRegOverlay(this,that,unc) astINVOKE(V,astRegOverlay_(astCheckRegion(this),astCheckRegion(that),unc,STATUS_PTR))
456 #define astRegDummyFS(this) astINVOKE(V,astRegDummyFS_(astCheckRegion(this),STATUS_PTR))
457 #define astRegMapping(this) astINVOKE(O,astRegMapping_(astCheckRegion(this),STATUS_PTR))
458 #define astRegPins(this,pset,unc,mask) astINVOKE(V,astRegPins_(astCheckRegion(this),astCheckPointSet(pset),unc?astCheckRegion(unc):unc,mask,STATUS_PTR))
459 #define astRegTranPoint(this,in,np,forward) astRegTranPoint_(this,in,np,forward,STATUS_PTR)
460 #define astGetRegFS(this) astINVOKE(O,astGetRegFS_(astCheckRegion(this),STATUS_PTR))
461 #define astSetRegFS(this,frm) astINVOKE(V,astSetRegFS_(astCheckRegion(this),astCheckFrame(frm),STATUS_PTR))
462 #define astTestUnc(this) astINVOKE(V,astTestUnc_(astCheckRegion(this),STATUS_PTR))
463 #define astResetCache(this) astINVOKE(V,astResetCache_(astCheckRegion(this),STATUS_PTR))
464 #define astRegTrace(this,n,dist,ptr) astINVOKE(V,astRegTrace_(astCheckRegion(this),n,dist,ptr,STATUS_PTR))
465 
466 /* Since a NULL PointSet pointer is acceptable for "out", we must omit the
467    argument checking in that case. (But unfortunately, "out" then gets
468    evaluated twice - this is unlikely to matter, but is there a better way?) */
469 
470 #define astRegTransform(this,in,forward,out,frm) \
471 astINVOKE(O,astRegTransform_(astCheckRegion(this),in?astCheckPointSet(in):NULL,forward,(out)?astCheckPointSet(out):NULL,frm,STATUS_PTR))
472 
473 #define astBTransform(this,in,forward,out) \
474 astINVOKE(O,astBTransform_(astCheckRegion(this),in?astCheckPointSet(in):NULL,forward,(out)?astCheckPointSet(out):NULL,STATUS_PTR))
475 
476 #define astClearNegated(this) astINVOKE(V,astClearNegated_(astCheckRegion(this),STATUS_PTR))
477 #define astGetNegated(this) astINVOKE(V,astGetNegated_(astCheckRegion(this),STATUS_PTR))
478 #define astSetNegated(this,negated) astINVOKE(V,astSetNegated_(astCheckRegion(this),negated,STATUS_PTR))
479 #define astTestNegated(this) astINVOKE(V,astTestNegated_(astCheckRegion(this),STATUS_PTR))
480 
481 #define astClearAdaptive(this) astINVOKE(V,astClearAdaptive_(astCheckRegion(this),STATUS_PTR))
482 #define astGetAdaptive(this) astINVOKE(V,astGetAdaptive_(astCheckRegion(this),STATUS_PTR))
483 #define astSetAdaptive(this,adaptive) astINVOKE(V,astSetAdaptive_(astCheckRegion(this),adaptive,STATUS_PTR))
484 #define astTestAdaptive(this) astINVOKE(V,astTestAdaptive_(astCheckRegion(this),STATUS_PTR))
485 
486 #define astClearRegionFS(this) astINVOKE(V,astClearRegionFS_(astCheckRegion(this),STATUS_PTR))
487 #define astGetRegionFS(this) astINVOKE(V,astGetRegionFS_(astCheckRegion(this),STATUS_PTR))
488 #define astSetRegionFS(this,fs) astINVOKE(V,astSetRegionFS_(astCheckRegion(this),fs,STATUS_PTR))
489 #define astTestRegionFS(this) astINVOKE(V,astTestRegionFS_(astCheckRegion(this),STATUS_PTR))
490 
491 #define astClearMeshSize(this) astINVOKE(V,astClearMeshSize_(astCheckRegion(this),STATUS_PTR))
492 #define astGetMeshSize(this) astINVOKE(V,astGetMeshSize_(astCheckRegion(this),STATUS_PTR))
493 #define astSetMeshSize(this,meshsize) astINVOKE(V,astSetMeshSize_(astCheckRegion(this),meshsize,STATUS_PTR))
494 #define astTestMeshSize(this) astINVOKE(V,astTestMeshSize_(astCheckRegion(this),STATUS_PTR))
495 
496 #define astClearClosed(this) astINVOKE(V,astClearClosed_(astCheckRegion(this),STATUS_PTR))
497 #define astGetClosed(this) astINVOKE(V,astGetClosed_(astCheckRegion(this),STATUS_PTR))
498 #define astSetClosed(this,closed) astINVOKE(V,astSetClosed_(astCheckRegion(this),closed,STATUS_PTR))
499 #define astTestClosed(this) astINVOKE(V,astTestClosed_(astCheckRegion(this),STATUS_PTR))
500 
501 #define astClearFillFactor(this) astINVOKE(V,astClearFillFactor_(astCheckRegion(this),STATUS_PTR))
502 #define astGetFillFactor(this) astINVOKE(V,astGetFillFactor_(astCheckRegion(this),STATUS_PTR))
503 #define astSetFillFactor(this,ff) astINVOKE(V,astSetFillFactor_(astCheckRegion(this),ff,STATUS_PTR))
504 #define astTestFillFactor(this) astINVOKE(V,astTestFillFactor_(astCheckRegion(this),STATUS_PTR))
505 
506 #else  /* Public only */
507 #define astMapRegion(this,map,frame) astINVOKE(O,astMapRegionId_(astCheckRegion(this),astCheckMapping(map),astCheckFrame(frame),STATUS_PTR))
508 #endif
509 
510 #endif
511 
512 
513 
514 
515 
516