1 /* 2 *+ 3 * Name: 4 * channel.h 5 6 * Type: 7 * C include file. 8 9 * Purpose: 10 * Define the interface to the Channel class. 11 12 * Invocation: 13 * #include "channel.h" 14 15 * Description: 16 * This include file defines the interface to the Channel class and 17 * provides the type definitions, function prototypes and macros, 18 * etc. needed to use this class. 19 * 20 * A Channel is the basic form of AST I/O channel, through which 21 * Objects may be written and later read back. It causes I/O to 22 * take place using a textual format via standard input and 23 * standard output. 24 * 25 * Writing to a Channel will result in a textual representation of 26 * an Object being produced on standard output. Reading from a 27 * Channel will causes a textual description of an Object to be 28 * read from standard input, and that Object to be 29 * re-created. Channel I/O is stream based, and multiple objects 30 * may be written or read in succession through the same Channel. A 31 * null Object pointer is returned if there is no more input to 32 * read. 33 34 * Inheritance: 35 * The Channel class inherits from the Object class. 36 37 * Attributes Over-Ridden: 38 * None. 39 40 * New Attributes Defined: 41 * Comment (integer) 42 * A boolean value (0 or 1) which controls whether comments are 43 * to be included in textual output generated by a Channel. If 44 * this value is non-zero (the default), then comments will be 45 * included. If it is zero, comments will be omitted. 46 * Full (integer) 47 * A three-state flag (taking values -1, 0 or +1) which controls 48 * the amount of information included in textual output 49 * generated by a Channel. If this value is zero (the default), 50 * then a modest amount of non-essential but useful information 51 * will be included along with the output. If Full is negative, 52 * all non-essential information will be suppressed, while if it 53 * is positive, the output will include the maximum amount of 54 * information about the Object being written. 55 * Skip (integer) 56 * A boolean value which indicates whether the Objects being 57 * read through a Channel are inter-mixed with other external 58 * data. If this value is zero (the default), then the source of 59 * input data is expected to contain descriptions of AST Objects 60 * and comments and nothing else (if anything else is read, an 61 * error will result). If Skip is non-zero, then any non-Object 62 * data encountered between Objects will simply be skipped over 63 * in order to reach the next Object. 64 65 * Methods Over-Ridden: 66 * Public: 67 * None. 68 * 69 * Protected: 70 * astClearAttrib 71 * Clear an attribute value for a Mapping. 72 * astGetAttrib 73 * Get an attribute value for a Mapping. 74 * astSetAttrib 75 * Set an attribute value for a Mapping. 76 * astTestAttrib 77 * Test if an attribute value has been set for a Mapping. 78 79 * New Methods Defined: 80 * Public: 81 * astRead 82 * Read an Object from a Channel. 83 * astWrite 84 * Write an Object to a Channel. 85 * 86 * Protected: 87 * astClearComment 88 * Clear the Comment attribute for a Channel. 89 * astClearFull 90 * Clear the Full attribute for a Channel. 91 * astClearSkip 92 * Clear the Skip attribute for a Channel. 93 * astGetComment 94 * Get the value of the Comment attribute for a Channel. 95 * astGetFull 96 * Get the value of the Full attribute for a Channel. 97 * astGetNextData 98 * Read the next item of data from a data source. 99 * astGetNextText 100 * Read the next line of input text from a data source. 101 * astGetSkip 102 * Get the value of the Skip attribute for a Channel. 103 * astPutNextText 104 * Write a line of output text to a data sink. 105 * astReadClassData 106 * Read values from a data source for a class loader. 107 * astReadDouble 108 * Read a double value as part of loading a class. 109 * astReadInt 110 * Read an int value as part of loading a class. 111 * astReadObject 112 * Read a (sub)Object as part of loading a class. 113 * astReadString 114 * Read a string value as part of loading a class. 115 * astSetComment 116 * Set the value of the Comment attribute for a Channel. 117 * astSetFull 118 * Set the value of the Full attribute for a Channel. 119 * astSetSkip 120 * Set the value of the Skip attribute for a Channel. 121 * astTestComment 122 * Test whether a value has been set for the Comment attribute of a 123 * Channel. 124 * astTestFull 125 * Test whether a value has been set for the Full attribute of a 126 * Channel. 127 * astTestSkip 128 * Test whether a value has been set for the Skip attribute of a 129 * Channel. 130 * astWriteBegin 131 * Write a "Begin" data item to a data sink. 132 * astWriteDouble 133 * Write a double value to a data sink. 134 * astWriteEnd 135 * Write an "End" data item to a data sink. 136 * astWriteInt 137 * Write an integer value to a data sink. 138 * astWriteIsA 139 * Write an "IsA" data item to a data sink. 140 * astWriteObject 141 * Write an Object as a value to a data sink. 142 * astWriteString 143 * Write a string value to a data sink. 144 145 * Other Class Functions: 146 * Public: 147 * astChannel 148 * Create a Channel. 149 * astChannelFor 150 * Create a Channel from a foreign language interface. 151 * astIsAChannel 152 * Test class membership. 153 * 154 * Protected: 155 * astCheckChannel 156 * Validate class membership. 157 * astInitChannel 158 * Initialise a Channel. 159 * astInitChannelVtab 160 * Initialise the virtual function table for the Channel class. 161 * astLoadChannel 162 * Load a Channel. 163 164 * Type Definitions: 165 * Public: 166 * AstChannel 167 * Channel object type. 168 * 169 * Protected: 170 * AstChannelVtab 171 * Channel virtual function table type. 172 173 * Feature Test Macros: 174 * astCLASS 175 * If the astCLASS macro is undefined, only public symbols are 176 * made available, otherwise protected symbols (for use in other 177 * class implementations) are defined. This macro also affects 178 * the reporting of error context information, which is only 179 * provided for external calls to the AST library. 180 181 * Copyright: 182 * Copyright (C) 1997-2006 Council for the Central Laboratory of the 183 * Research Councils 184 185 * Licence: 186 * This program is free software: you can redistribute it and/or 187 * modify it under the terms of the GNU Lesser General Public 188 * License as published by the Free Software Foundation, either 189 * version 3 of the License, or (at your option) any later 190 * version. 191 * 192 * This program is distributed in the hope that it will be useful, 193 * but WITHOUT ANY WARRANTY; without even the implied warranty of 194 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 195 * GNU Lesser General Public License for more details. 196 * 197 * You should have received a copy of the GNU Lesser General 198 * License along with this program. If not, see 199 * <http://www.gnu.org/licenses/>. 200 201 * Authors: 202 * RFWS: R.F. Warren-Smith (Starlink) 203 204 * History: 205 * 12-AUG-1996 (RFWS): 206 * Original version. 207 * 12-DEC-1996 (RFWS): 208 * Added the astChannelFor function. 209 * 11-NOV-2002 (DSB): 210 * Added astWriteInvocations. 211 * 8-JAN-2003 (DSB): 212 * Added protected astInitAxisVtab method. 213 *- 214 */ 215 216 /* Include files. */ 217 /* ============== */ 218 /* Interface definitions. */ 219 /* ---------------------- */ 220 #include "object.h" /* Base Object class */ 221 222 /* Note that the usual setting of the CHANNEL_INCLUDED flag, which 223 prevents this file being included more than once, must be deferred 224 until after including the "object.h" file. This is because 225 "object.h" needs to include the present interface definition (as a 226 form of "forward reference") in order to have access to I/O 227 Channels itself. */ 228 #if !defined( CHANNEL_INCLUDED ) 229 #define CHANNEL_INCLUDED 230 231 /* C header files. */ 232 /* --------------- */ 233 #include <stddef.h> 234 235 /* Macros */ 236 /* ====== */ 237 /* Define constants used to size global arrays in this module. */ 238 #define AST__CHANNEL_GETATTRIB_BUFF_LEN 50 239 240 /* Define a dummy __attribute__ macro for use on non-GNU compilers. */ 241 #ifndef __GNUC__ 242 # define __attribute__(x) /*NOTHING*/ 243 #endif 244 245 /* Type Definitions. */ 246 /* ================= */ 247 248 /* The astWarnings function returns a KeyMap pointer, but we cannot 249 include keymap.h here to define the AstKeyMap type since keymap.h 250 itself include sthis file. So we make a temporary declaration which 251 will be replaced by the full one when the keymap.h file is included. */ 252 struct AstKeyMap; 253 254 /* Channel structure. */ 255 /* ------------------ */ 256 /* This structure contains all information that is unique to each 257 object in the class (e.g. its instance variables). */ 258 typedef struct AstChannel { 259 260 /* Attributes inherited from the parent class. */ 261 AstObject object; /* Parent class structure */ 262 263 /* Attributes specific to objects in this class. */ 264 const char *(* source)( void ); /* Pointer to source function */ 265 char *(* source_wrap)( const char *(*)(void), int * ); 266 /* Source wrapper function pointer */ 267 void (* sink)( const char * ); /* Pointer to sink function */ 268 void (* sink_wrap)( void (*)( const char *), const char *, int * ); 269 /* Sink wrapper function pointer */ 270 int comment; /* Output comments? */ 271 int full; /* Set max/normal/min information level */ 272 int skip; /* Skip data between Objects? */ 273 int indent; /* Indentation increment in astWrite output */ 274 int report_level; /* Skip data between Objects? */ 275 int strict; /* Report unexpected data items? */ 276 void *data; /* Data to pass to source/sink functions */ 277 char **warnings; /* Array of warning strings */ 278 int nwarn; /* Size of warnings array */ 279 FILE *fd_in; /* Descriptor for source text file */ 280 char *fn_in; /* Full path for source text file */ 281 FILE *fd_out; /* Descriptor for sink text file */ 282 char *fn_out; /* Full path for sink text file */ 283 } AstChannel; 284 285 /* Virtual function table. */ 286 /* ----------------------- */ 287 /* This table contains all information that is the same for all 288 objects in the class (e.g. pointers to its virtual functions). */ 289 #if defined(astCLASS) /* Protected */ 290 typedef struct AstChannelVtab { 291 292 /* Properties (e.g. methods) inherited from the parent class. */ 293 AstObjectVtab object_vtab; /* Parent class virtual function table */ 294 295 /* A Unique identifier to determine class membership. */ 296 AstClassIdentifier id; 297 298 /* Properties (e.g. methods) specific to this class. */ 299 struct AstKeyMap *(* Warnings)( AstChannel *, int * ); 300 AstObject *(* Read)( AstChannel *, int * ); 301 AstObject *(* ReadObject)( AstChannel *, const char *, AstObject *, int * ); 302 char *(* GetNextText)( AstChannel *, int * ); 303 char *(* ReadString)( AstChannel *, const char *, const char *, int * ); 304 double (* ReadDouble)( AstChannel *, const char *, double, int * ); 305 int (* GetComment)( AstChannel *, int * ); 306 int (* GetFull)( AstChannel *, int * ); 307 int (* GetStrict)( AstChannel *, int * ); 308 int (* ReadInt)( AstChannel *, const char *, int, int * ); 309 int (* TestComment)( AstChannel *, int * ); 310 int (* TestFull)( AstChannel *, int * ); 311 int (* TestStrict)( AstChannel *, int * ); 312 int (* Write)( AstChannel *, AstObject *, int * ); 313 void (* AddWarning)( AstChannel *, int, const char *, const char *, int * ); 314 void (* ClearComment)( AstChannel *, int * ); 315 void (* ClearFull)( AstChannel *, int * ); 316 void (* ClearStrict)( AstChannel *, int * ); 317 void (* GetNextData)( AstChannel *, int, char **, char **, int * ); 318 void (* PutChannelData)( AstChannel *, void *, int * ); 319 void (* PutNextText)( AstChannel *, const char *, int * ); 320 void (* ReadClassData)( AstChannel *, const char *, int * ); 321 void (* SetComment)( AstChannel *, int, int * ); 322 void (* SetFull)( AstChannel *, int, int * ); 323 void (* SetStrict)( AstChannel *, int, int * ); 324 void (* WriteBegin)( AstChannel *, const char *, const char *, int * ); 325 void (* WriteDouble)( AstChannel *, const char *, int, int, double, const char *, int * ); 326 void (* WriteEnd)( AstChannel *, const char *, int * ); 327 void (* WriteInt)( AstChannel *, const char *, int, int, int, const char *, int * ); 328 void (* WriteIsA)( AstChannel *, const char *, const char *, int * ); 329 void (* WriteObject)( AstChannel *, const char *, int, int, AstObject *, const char *, int * ); 330 void (* WriteString)( AstChannel *, const char *, int, int, const char *, const char *, int * ); 331 332 int (* GetSkip)( AstChannel *, int * ); 333 int (* TestSkip)( AstChannel *, int * ); 334 void (* ClearSkip)( AstChannel *, int * ); 335 void (* SetSkip)( AstChannel *, int, int * ); 336 337 int (* GetReportLevel)( AstChannel *, int * ); 338 int (* TestReportLevel)( AstChannel *, int * ); 339 void (* ClearReportLevel)( AstChannel *, int * ); 340 void (* SetReportLevel)( AstChannel *, int, int * ); 341 342 int (* GetIndent)( AstChannel *, int * ); 343 int (* TestIndent)( AstChannel *, int * ); 344 void (* ClearIndent)( AstChannel *, int * ); 345 void (* SetIndent)( AstChannel *, int, int * ); 346 347 const char *(* GetSourceFile)( AstChannel *, int * ); 348 int (* TestSourceFile)( AstChannel *, int * ); 349 void (* ClearSourceFile)( AstChannel *, int * ); 350 void (* SetSourceFile)( AstChannel *, const char *, int * ); 351 352 const char *(* GetSinkFile)( AstChannel *, int * ); 353 int (* TestSinkFile)( AstChannel *, int * ); 354 void (* ClearSinkFile)( AstChannel *, int * ); 355 void (* SetSinkFile)( AstChannel *, const char *, int * ); 356 } AstChannelVtab; 357 358 /* Define a private structure type used to store linked lists of 359 name-value associations. */ 360 typedef struct AstChannelValue { 361 struct AstChannelValue *flink; /* Link to next element */ 362 struct AstChannelValue *blink; /* Link to previous element */ 363 char *name; /* Pointer to name string */ 364 union { /* Holds pointer to value */ 365 char *string; /* Pointer to string value */ 366 AstObject *object; /* Pointer to Object value */ 367 } ptr; 368 int is_object; /* Whether value is an Object (else string) */ 369 } AstChannelValue; 370 371 #if defined(THREAD_SAFE) 372 373 /* Define a structure holding all data items that are global within this 374 class. */ 375 typedef struct AstChannelGlobals { 376 AstChannelVtab Class_Vtab; 377 int Class_Init; 378 int AstReadClassData_Msg; 379 char GetAttrib_Buff[ AST__CHANNEL_GETATTRIB_BUFF_LEN + 1 ]; 380 int Items_Written; 381 int Current_Indent; 382 int Nest; 383 int Nwrite_Invoc; 384 char **Object_Class; 385 AstChannelValue **Values_List; 386 char **Values_Class; 387 int *Values_OK; 388 int *End_Of_Object; 389 void *Channel_Data; 390 } AstChannelGlobals; 391 392 #endif 393 394 395 396 #endif 397 398 /* Function prototypes. */ 399 /* ==================== */ 400 /* Prototypes for standard class functions. */ 401 /* ---------------------------------------- */ 402 astPROTO_CHECK(Channel) /* Check class membership */ 403 astPROTO_ISA(Channel) /* Test class membership */ 404 405 /* Constructor. */ 406 #if defined(astCLASS) /* Protected. */ 407 AstChannel *astChannel_( const char *(*)( void ), void (*)( const char * ), 408 const char *, int *, ...); 409 #else 410 AstChannel *astChannelId_( const char *(*)( void ), void (*)( const char * ), 411 const char *, ... )__attribute__((format(printf,3,4))); 412 AstChannel *astChannelForId_( const char *(*)( void ), 413 char *(*)( const char *(*)( void ), int * ), 414 void (*)( const char * ), 415 void (*)( void (*)( const char * ), 416 const char *, int * ), 417 const char *, ... ); 418 #endif 419 420 421 #if defined(astCLASS) /* Protected */ 422 423 /* Initialiser. */ 424 AstChannel *astInitChannel_( void *, size_t, int, AstChannelVtab *, 425 const char *, const char *(*)( void ), 426 char *(*)( const char *(*)( void ), int * ), 427 void (*)( const char * ), 428 void (*)( void (*)( const char * ), 429 const char *, int * ), int * ); 430 431 432 /* Vtab initialiser. */ 433 void astInitChannelVtab_( AstChannelVtab *, const char *, int * ); 434 435 /* Loader. */ 436 AstChannel *astLoadChannel_( void *, size_t, AstChannelVtab *, 437 const char *, AstChannel *channel, int * ); 438 439 /* Thread-safe initialiser for all global data used by this module. */ 440 #if defined(THREAD_SAFE) 441 void astInitChannelGlobals_( AstChannelGlobals * ); 442 #endif 443 #endif 444 445 /* Prototypes for member functions. */ 446 /* -------------------------------- */ 447 AstObject *astRead_( AstChannel *, int * ); 448 int astWrite_( AstChannel *, AstObject *, int * ); 449 void astPutChannelData_( AstChannel *, void *, int * ); 450 void *astChannelData_( void ); 451 struct AstKeyMap *astWarnings_( AstChannel *, int * ); 452 453 char *astSourceWrap_( const char *(*)( void ), int * ); 454 void astSinkWrap_( void (*)( const char * ), const char *, int * ); 455 456 # if defined(astCLASS) /* Protected */ 457 void astStoreChannelData_( AstChannel *, int * ); 458 AstObject *astReadObject_( AstChannel *, const char *, AstObject *, int * ); 459 char *astGetNextText_( AstChannel *, int * ); 460 char *astReadString_( AstChannel *, const char *, const char *, int * ); 461 double astReadDouble_( AstChannel *, const char *, double, int * ); 462 int astGetComment_( AstChannel *, int * ); 463 int astGetFull_( AstChannel *, int * ); 464 int astGetStrict_( AstChannel *, int * ); 465 int astReadInt_( AstChannel *, const char *, int, int * ); 466 int astTestComment_( AstChannel *, int * ); 467 int astTestFull_( AstChannel *, int * ); 468 int astTestStrict_( AstChannel *, int * ); 469 void astAddWarning_( void *, int, const char *, const char *, int *, ... )__attribute__((format(printf,3,6))); 470 void astClearComment_( AstChannel *, int * ); 471 void astClearFull_( AstChannel *, int * ); 472 void astClearStrict_( AstChannel *, int * ); 473 void astGetNextData_( AstChannel *, int, char **, char **, int * ); 474 void astPutNextText_( AstChannel *, const char *, int * ); 475 void astReadClassData_( AstChannel *, const char *, int * ); 476 void astSetComment_( AstChannel *, int, int * ); 477 void astSetFull_( AstChannel *, int, int * ); 478 void astSetStrict_( AstChannel *, int, int * ); 479 void astWriteBegin_( AstChannel *, const char *, const char *, int * ); 480 void astWriteDouble_( AstChannel *, const char *, int, int, double, const char *, int * ); 481 void astWriteEnd_( AstChannel *, const char *, int * ); 482 void astWriteInt_( AstChannel *, const char *, int, int, int, const char *, int * ); 483 int astWriteInvocations_( int * ); 484 void astWriteIsA_( AstChannel *, const char *, const char *, int * ); 485 void astWriteObject_( AstChannel *, const char *, int, int, AstObject *, const char *, int * ); 486 void astWriteString_( AstChannel *, const char *, int, int, const char *, const char *, int * ); 487 488 int astGetSkip_( AstChannel *, int * ); 489 int astTestSkip_( AstChannel *, int * ); 490 void astClearSkip_( AstChannel *, int * ); 491 void astSetSkip_( AstChannel *, int, int * ); 492 493 int astGetReportLevel_( AstChannel *, int * ); 494 int astTestReportLevel_( AstChannel *, int * ); 495 void astClearReportLevel_( AstChannel *, int * ); 496 void astSetReportLevel_( AstChannel *, int, int * ); 497 498 int astGetIndent_( AstChannel *, int * ); 499 int astTestIndent_( AstChannel *, int * ); 500 void astClearIndent_( AstChannel *, int * ); 501 void astSetIndent_( AstChannel *, int, int * ); 502 503 const char *astGetSourceFile_( AstChannel *, int * ); 504 int astTestSourceFile_( AstChannel *, int * ); 505 void astClearSourceFile_( AstChannel *, int * ); 506 void astSetSourceFile_( AstChannel *, const char *, int * ); 507 508 const char *astGetSinkFile_( AstChannel *, int * ); 509 int astTestSinkFile_( AstChannel *, int * ); 510 void astClearSinkFile_( AstChannel *, int * ); 511 void astSetSinkFile_( AstChannel *, const char *, int * ); 512 513 #endif 514 515 /* Function interfaces. */ 516 /* ==================== */ 517 /* These macros are wrap-ups for the functions defined by this class 518 to make them easier to invoke (e.g. to avoid type mis-matches when 519 passing pointers to objects from derived classes). */ 520 521 /* Interfaces to standard class functions. */ 522 /* --------------------------------------- */ 523 /* Some of these functions provide validation, so we cannot use them to 524 validate their own arguments. We must use a cast when passing object 525 pointers (so that they can accept objects from derived classes). */ 526 527 /* Check class membership. */ 528 #define astCheckChannel(this) astINVOKE_CHECK(Channel,this,0) 529 #define astVerifyChannel(this) astINVOKE_CHECK(Channel,this,1) 530 531 /* Test class membership. */ 532 #define astIsAChannel(this) astINVOKE_ISA(Channel,this) 533 534 /* Constructor. */ 535 #if defined(astCLASS) /* Protected. */ 536 #define astChannel astINVOKE(F,astChannel_) 537 #else 538 #define astChannel astINVOKE(F,astChannelId_) 539 #define astChannelFor astINVOKE(F,astChannelForId_) 540 #endif 541 542 #if defined(astCLASS) /* Protected */ 543 544 /* Initialiser. */ 545 #define astInitChannel(mem,size,init,vtab,name,source,source_wrap,sink,sink_wrap) \ 546 astINVOKE(O,astInitChannel_(mem,size,init,vtab,name,source,source_wrap,sink,sink_wrap,STATUS_PTR)) 547 548 /* Vtab Initialiser. */ 549 #define astInitChannelVtab(vtab,name) astINVOKE(V,astInitChannelVtab_(vtab,name,STATUS_PTR)) 550 /* Loader. */ 551 #define astLoadChannel(mem,size,vtab,name,channel) \ 552 astINVOKE(O,astLoadChannel_(mem,size,vtab,name,astCheckChannel(channel),STATUS_PTR)) 553 #endif 554 555 /* Interfaces to member functions. */ 556 /* ------------------------------- */ 557 /* Here we make use of astCheckChannel to validate Channel pointers 558 before use. This provides a contextual error report if a pointer 559 to the wrong sort of Object is supplied. */ 560 561 #define astRead(this) \ 562 astINVOKE(O,astRead_(astCheckChannel(this),STATUS_PTR)) 563 #define astWrite(this,object) \ 564 astINVOKE(V,astWrite_(astCheckChannel(this),astCheckObject(object),STATUS_PTR)) 565 #define astPutChannelData(this,data) \ 566 astINVOKE(V,astPutChannelData_(astCheckChannel(this),data,STATUS_PTR)) 567 #define astWarnings(this) \ 568 astINVOKE(O,astWarnings_(astCheckChannel(this),STATUS_PTR)) 569 570 #define astSourceWrap astSourceWrap_ 571 #define astSinkWrap astSinkWrap_ 572 #define astChannelData astChannelData_() 573 574 #if defined(astCLASS) /* Protected */ 575 #define astAddWarning astAddWarning_ 576 #define astStoreChannelData(this) \ 577 astStoreChannelData_(astCheckChannel(this),STATUS_PTR) 578 579 #define astClearComment(this) \ 580 astINVOKE(V,astClearComment_(astCheckChannel(this),STATUS_PTR)) 581 #define astClearFull(this) \ 582 astINVOKE(V,astClearFull_(astCheckChannel(this),STATUS_PTR)) 583 #define astClearStrict(this) \ 584 astINVOKE(V,astClearStrict_(astCheckChannel(this),STATUS_PTR)) 585 #define astGetComment(this) \ 586 astINVOKE(V,astGetComment_(astCheckChannel(this),STATUS_PTR)) 587 #define astGetFull(this) \ 588 astINVOKE(V,astGetFull_(astCheckChannel(this),STATUS_PTR)) 589 #define astGetNextData(this,begin,name,val) \ 590 astINVOKE(V,astGetNextData_(astCheckChannel(this),begin,name,val,STATUS_PTR)) 591 #define astGetNextText(this) \ 592 astINVOKE(V,astGetNextText_(astCheckChannel(this),STATUS_PTR)) 593 #define astGetStrict(this) \ 594 astINVOKE(V,astGetStrict_(astCheckChannel(this),STATUS_PTR)) 595 #define astPutNextText(this,line) \ 596 astINVOKE(V,astPutNextText_(astCheckChannel(this),line,STATUS_PTR)) 597 #define astReadClassData(this,class) \ 598 astINVOKE(V,astReadClassData_(astCheckChannel(this),class,STATUS_PTR)) 599 #define astReadDouble(this,name,def) \ 600 astINVOKE(V,astReadDouble_(astCheckChannel(this),name,def,STATUS_PTR)) 601 #define astReadInt(this,name,def) \ 602 astINVOKE(V,astReadInt_(astCheckChannel(this),name,def,STATUS_PTR)) 603 #define astReadObject(this,name,def) \ 604 astINVOKE(O,astReadObject_(astCheckChannel(this),name,(def)?astCheckObject(def):NULL,STATUS_PTR)) 605 #define astReadString(this,name,def) \ 606 astINVOKE(V,astReadString_(astCheckChannel(this),name,def,STATUS_PTR)) 607 #define astSetComment(this,value) \ 608 astINVOKE(V,astSetComment_(astCheckChannel(this),value,STATUS_PTR)) 609 #define astSetFull(this,value) \ 610 astINVOKE(V,astSetFull_(astCheckChannel(this),value,STATUS_PTR)) 611 #define astSetStrict(this,value) \ 612 astINVOKE(V,astSetStrict_(astCheckChannel(this),value,STATUS_PTR)) 613 #define astTestComment(this) \ 614 astINVOKE(V,astTestComment_(astCheckChannel(this),STATUS_PTR)) 615 #define astTestFull(this) \ 616 astINVOKE(V,astTestFull_(astCheckChannel(this),STATUS_PTR)) 617 #define astTestStrict(this) \ 618 astINVOKE(V,astTestStrict_(astCheckChannel(this),STATUS_PTR)) 619 #define astWriteBegin(this,class,comment) \ 620 astINVOKE(V,astWriteBegin_(astCheckChannel(this),class,comment,STATUS_PTR)) 621 #define astWriteDouble(this,name,set,helpful,value,comment) \ 622 astINVOKE(V,astWriteDouble_(astCheckChannel(this),name,set,helpful,value,comment,STATUS_PTR)) 623 #define astWriteEnd(this,class) \ 624 astINVOKE(V,astWriteEnd_(astCheckChannel(this),class,STATUS_PTR)) 625 #define astWriteInt(this,name,set,helpful,value,comment) \ 626 astINVOKE(V,astWriteInt_(astCheckChannel(this),name,set,helpful,value,comment,STATUS_PTR)) 627 #define astWriteIsA(this,class,comment) \ 628 astINVOKE(V,astWriteIsA_(astCheckChannel(this),class,comment,STATUS_PTR)) 629 #define astWriteObject(this,name,set,helpful,value,comment) \ 630 astINVOKE(V,astWriteObject_(astCheckChannel(this),name,set,helpful,astCheckObject(value),comment,STATUS_PTR)) 631 #define astWriteString(this,name,set,helpful,value,comment) \ 632 astINVOKE(V,astWriteString_(astCheckChannel(this),name,set,helpful,value,comment,STATUS_PTR)) 633 634 #define astWriteInvocations astWriteInvocations_(STATUS_PTR) 635 636 #define astClearSkip(this) \ 637 astINVOKE(V,astClearSkip_(astCheckChannel(this),STATUS_PTR)) 638 #define astGetSkip(this) \ 639 astINVOKE(V,astGetSkip_(astCheckChannel(this),STATUS_PTR)) 640 #define astSetSkip(this,value) \ 641 astINVOKE(V,astSetSkip_(astCheckChannel(this),value,STATUS_PTR)) 642 #define astTestSkip(this) \ 643 astINVOKE(V,astTestSkip_(astCheckChannel(this),STATUS_PTR)) 644 645 #define astClearReportLevel(this) \ 646 astINVOKE(V,astClearReportLevel_(astCheckChannel(this),STATUS_PTR)) 647 #define astGetReportLevel(this) \ 648 astINVOKE(V,astGetReportLevel_(astCheckChannel(this),STATUS_PTR)) 649 #define astSetReportLevel(this,value) \ 650 astINVOKE(V,astSetReportLevel_(astCheckChannel(this),value,STATUS_PTR)) 651 #define astTestReportLevel(this) \ 652 astINVOKE(V,astTestReportLevel_(astCheckChannel(this),STATUS_PTR)) 653 654 #define astClearIndent(this) \ 655 astINVOKE(V,astClearIndent_(astCheckChannel(this),STATUS_PTR)) 656 #define astGetIndent(this) \ 657 astINVOKE(V,astGetIndent_(astCheckChannel(this),STATUS_PTR)) 658 #define astSetIndent(this,value) \ 659 astINVOKE(V,astSetIndent_(astCheckChannel(this),value,STATUS_PTR)) 660 #define astTestIndent(this) \ 661 astINVOKE(V,astTestIndent_(astCheckChannel(this),STATUS_PTR)) 662 663 #define astClearSourceFile(this) \ 664 astINVOKE(V,astClearSourceFile_(astCheckChannel(this),STATUS_PTR)) 665 #define astGetSourceFile(this) \ 666 astINVOKE(V,astGetSourceFile_(astCheckChannel(this),STATUS_PTR)) 667 #define astSetSourceFile(this,value) \ 668 astINVOKE(V,astSetSourceFile_(astCheckChannel(this),value,STATUS_PTR)) 669 #define astTestSourceFile(this) \ 670 astINVOKE(V,astTestSourceFile_(astCheckChannel(this),STATUS_PTR)) 671 672 #define astClearSinkFile(this) \ 673 astINVOKE(V,astClearSinkFile_(astCheckChannel(this),STATUS_PTR)) 674 #define astGetSinkFile(this) \ 675 astINVOKE(V,astGetSinkFile_(astCheckChannel(this),STATUS_PTR)) 676 #define astSetSinkFile(this,value) \ 677 astINVOKE(V,astSetSinkFile_(astCheckChannel(this),value,STATUS_PTR)) 678 #define astTestSinkFile(this) \ 679 astINVOKE(V,astTestSinkFile_(astCheckChannel(this),STATUS_PTR)) 680 681 #endif 682 #endif 683 684 685 686 687 688