The pointer returned by astRead () could
identify any class of Object--this is determined entirely by the
external data being read. If it is necessary to test for a particular
class (say a Frame), this may be done as follows using the appropriate
member of the astIsA
Class
family of functions:
int ok; ... ok = astIsAFrame( object );
Note, however, that this will accept any Frame, so would be equally happy with a basic Frame or a SkyFrame. An alternative validation strategy would be to obtain the value of the Object's Class attribute and then test this character string, as follows:
#include <string.h> ... ok = !strcmp( astGetC( object, "Class" ), "Frame" );
This would only accept a basic Frame and would reject a SkyFrame.
AST A Library for Handling World Coordinate Systems in Astronomy