28 # if !defined(AIPS_FITS)
97 v = x.
v;
return *
this; }
99 v = (x ==
True ?
'T' :
'F');
return *
this; }
214 static void f2l(
char *,
void *,
int);
215 static void l2f(
void *,
char *,
int);
216 static void f2l(
unsigned char *,
void *,
int);
217 static void l2f(
void *,
unsigned char *,
int);
218 static void f2l(
short *,
void *,
int);
219 static void l2f(
void *,
short *,
int);
220 static void f2l(
Int *,
void *,
int);
221 static void l2f(
void *,
Int *,
int);
222 static void f2l(
long *,
void *,
int);
223 static void l2f(
void *,
long *,
int);
224 static void f2l(
float *,
void *,
int);
225 static void l2f(
void *,
float *,
int);
226 static void f2l(
double *,
void *,
int);
227 static void l2f(
void *,
double *,
int);
236 static void swap2(
void *,
void *,
int);
237 static void swap4(
void *,
void *,
int);
238 static void swap8(
void *,
void *,
int);
283 static void fstr2str(
char *,
const char *,
int);
284 static int str2fstr(
char *,
const char *,
int);
286 static int get_value_id(
const char *s,
int l,
int &pos);
290 static int get_comment(
const char *s,
int len,
int &begpos);
336 ((pow < 0) ? (((double)numb) /
tenpowerD[-
pow]) : ((
double)numb));
340 ((pow < 0) ? (((float)numb) /
tenpowerF[-
pow]) : ((
float)numb));
349 const char *
aname()
const;
355 # if defined(TURBOCPP)
386 const void *, int,
const char *&)
const;
388 const void *, int,
const char *&)
const;
392 const void *,
int,
const char *&)
const;
496 const char *
err(
int)
const;
534 const char *
name()
const;
544 const char *
comm()
const;
565 const void *
value()
const;
581 void comm(
const char *);
584 void name(
const char *);
624 void setcomm(
const char *,
int);
627 static void memchk(
void *);
648 name_(0), kw_(0), comm_(0), val(0) {
init(k); }
675 return vallen ? (
const char *)
val :
""; }
679 cerr <<
"Unexpected keyword type in FitsKeyword::asInt()\n";
692 cerr <<
"Unexpected keyword type in asFloat()\n";
705 cerr <<
"Unexpected keyword type in asDouble()\n";
786 void mk(
const char *n,
Bool v,
const char *
c = 0);
787 void mk(
const char *n,
const char *v = 0,
const char *
c = 0);
788 void mk(
const char *n,
Int v,
const char *
c = 0);
789 void mk(
const char *n,
long v,
const char *
c = 0);
790 void mk(
const char *n,
float v,
const char *
c = 0);
791 void mk(
const char *n,
double v,
const char *
c = 0);
792 void mk(
const char *n,
Int r,
Int i,
const char *
c = 0);
793 void mk(
const char *n,
float r,
float i,
const char *
c = 0);
794 void mk(
const char *n,
double r,
double i,
const char *
c = 0);
798 void spaces(
const char *n = 0,
const char *
c = 0);
801 void comment(
const char *n = 0,
const char *
c = 0);
843 void parse(
const char *,
int);
868 const void *val,
const char *errmsg);
875 total(0), cursor(0) { }
884 int ndx) {
first();
return next(n,ndx); }
997 const char *
err(
int)
const;
1037 static void setNaN(
double &val);
1038 static void setNaN(
float &val);
static const ReservedFitsKeyword & user_def_item
FitsVADesc(const FitsVADesc &x)
FitsKeywordList & operator=(const FitsKeywordList &)
static const int resalpha[26]
static FITS::ValueType getfitstype(NoConvert< DComplex > x)
const char * aname() const
static int digit2bin(char c)
static const int no_items
FitsBit(const FitsBit &x)
IComplex asIComplex() const
FitsKeyword & operator=(const FitsKeyword &)
static const int minfltexp
FITS templated helper class.
FitsKeyword * next(const FITS::ReservedName &)
void parse(const char *, int)
For parsing a single string.
const char * parse_err(int) const
static void swap2(void *, void *, int)
std::complex< Float > Complex
static const ReservedFitsKeyword & error_item
static void setNaN(double &val)
For blanking purposes, we need to be able to get a NaN.
DComplex asDComplex() const
void mk(FITS::ReservedName k, Bool v, const char *c=0)
Add (make) a reserved keyword with the given value and optional comment The comment will be truncated...
const FitsKeyword * next(const FITS::ReservedName &x, int n)
int essential_name(const char *, int) const
const ReservedFitsKeyword & spaces() const
FitsKeyCardTranslator(int=100)
void comment(const char *n=0, const char *c=0)
add a comment card
const ReservedFitsKeyword & kw() const
std::string toString() const
Convert the list to a string containing the 80-byte FITS headers.
int no_parse_errs() const
int isreserved(const char *, int) const
const ReservedFitsKeyword & userdef_item() const
void insert(FitsKeyword &)
FitsKeyword(const FitsKeyword &)
A word about friends: FitsKeywordList accesses the next and prev pointers and the FitsKeyword constru...
int build(char *, FitsKeywordList &)
static int localsize(FITS::ValueType t)
static void parse_vatform(const char *s, FITS::ValueType &valType, int &maxelem)
utility function to parse the binary table variable array column (i.e.
FitsLogical(const FitsLogical &x)
Complex asComplex() const
const char * asString() const
const ReservedFitsKeyword & end_item() const
static functions and enumerations
void init(const FitsKeyword &)
static FITS::ValueType getfitstype(NoConvert< IComplex > x)
virtual casacore::String type() const
Implements RegionShape::type.
static float tenpowerF[39]
FITS::ValueType type_
the keyword value
FITS::ValueType type() const
the datatype of the keyword
const ReservedFitsKeyword & err_item() const
static FITS::ValueType getfitstype(NoConvert< char > x)
static const ReservedFitsKeyword & history_item
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
static Bool isa_letter(char)
helper class for FITS Binary Tables
static const int maxdblexp
HDUType
Types of FITS Header-Data Units.
ostream & operator<<(ostream &os, const std::pair< T, U > &p)
FitsLogical & operator=(const FitsLogical &x)
static int ckaccum(double &, Int, int)
static void fmtcard(char *, const FitsKeyword &)
ValueType
FITS I/O Error message types.
static void fstr2str(char *, const char *, int)
const char * name() const
get info about the name
const char * comm() const
access the keyword comment
static int get_value_id(const char *s, int l, int &pos)
const FitsKeyword * operator()(int n)
static double tenD(Int, int)
const ReservedFitsKeyword & history() const
int err_cardno(int) const
static FITS::ValueType getfitstype(NoConvert< Int > x)
static const int maxfltexp
static void swap4(void *, void *, int)
static Bool isFP(const float *)
These functions are useful to tell if some type is a floating point type.
analyse the value of a header card
void(* FITSErrorHandler)(const char *errMessage, FITSError::ErrorLevel severity)
Define a typedef for the handler function signature for convenience.
int rules(FitsKeyword &, FITSErrorHandler errhandler=FITSError::defaultHandler)
static void get_numeric(const char *s, int len, FitsValueResult &result)
const ReservedFitsKeyword & get_essential(int, Bool, FITS::ValueType, const void *, int, const char *&) const
static void l2f(void *, FitsLogical *, int)
const FitsKeyword * next()
FITS::ValueType type() const
const ReservedFitsKeyword & operator[](int i) const
const char * err(int) const
static float tenF(Int, int)
static FITS::ValueType getfitstype(NoConvert< double > x)
static Bool isa_digit(char c)
FitsDevice
Supported FITS Physical Devices.
FitsBit & operator=(const FitsBit &x)
void end()
add the end card.
std::complex< Double > DComplex
collection of reserved FITS keywords
Utility functions for floating point values.
FitsKeyword & parse(const char *, int)
void del()
delete the current keyword (the thing returned by curr()) from the list
const FitsKeyword * next(const char *x)
static FITS::ValueType getfitstype(NoConvert< FitsBit > x)
static int chk_comment(const char *s, int len)
static FITS::ValueType getfitstype(NoConvert< short > x)
const FitsKeyword * prev()
static const ReservedFitsKeyword & end__item
const FitsKeyword * curr()
const char * aname(FITS::ReservedName) const
static const float minfloat
static const double mindouble
static const ReservedFitsKeyword resword[]
bool Bool
Define the standard types used by Casacore.
void setval(const FITS::ValueType &, const void *, int)
static void f2l(FitsLogical *, void *, int)
data conversion routines: FITS - local
FitsRecType
Types of FITS Records.
list of read-only FITS keywords
static FITS::ValueType getfitstype(NoConvert< FitsVADesc > x)
FitsVADesc & operator=(const FitsVADesc &x)
const char * err(int) const
static int get_comment(const char *s, int len, int &begpos)
friend ostream & operator<<(ostream &o, const FitsVADesc &)
static void valstr(ostream &o, const ValueType &ty, const void *val)
static FITS::ValueType getfitstype(NoConvert< long > x)
void history(const char *c=0)
add a history card
char * comm_
the keyword comment if comm_ is 0, there is no comment
static ReservedFitsKeywordCollection & ResWord
static int letter2bin(char)
friend ostream & operator<<(ostream &o, const FitsLogical &)
char * name_
the keyword name if name_ is 0, keyword is not a user defined name if ndx is 0, there is no index ...
Bool requires_value(int) const
static const ReservedFitsKeyword & spaces_item
FITS::ReservedName name() const
FitsKeyword & make(const char *nm, FITS::ValueType t, const void *v, const char *c)
static const int maxsigdigits
static FITS::ValueType getfitstype(NoConvert< float > x)
void setcomm(const char *, int)
static Bool isa_text(char c)
FitsKeywordList & parse(const char *, FitsKeywordList &, int, FITSErrorHandler, Bool)
FitsKeyword * operator()(int)
Retrieve specific keywords – these also set the current mark.
int rules(const ReservedFitsKeyword &, const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
const ReservedFitsKeyword * kw_
static int trim_comment(const char *s, int len)
static const float maxfloat
linked list of FITS keywords
static FITS::ValueType getfitstype(NoConvert< Complex > x)
FitsKeyword & mkerr(const char *s, int len)
static double tenpowerD[309]
FitsArrayOption
Options on FITS array manipulations.
const Double c
Fundamental physical constants (SI units):
static FITS::ValueType getfitstype(NoConvert< unsigned char > x)
static void memchk(void *)
static void get_value(const char *s, int len, FitsValueResult &result)
analyse the name of a header card
const void * value() const
const FitsKeyword * next(const FITS::ReservedName &x)
ConstFitsKeywordList(FitsKeywordList &x)
const ReservedFitsKeyword & comment() const
static const int mindblexp
static const int maxexpdig
static const double maxdouble
Bool asBool() const
access the value of the keyword
LatticeExprNode pow(const LatticeExprNode &left, const LatticeExprNode &right)
translator between Keyword lists and fixed FITS cars
static void get_name(const char *s, int len, FitsNameResult &result)
const ReservedFitsKeyword & match(int, const char *, int, Bool, FITS::ValueType, const void *, int, const char *&) const
FitsKeyword & makeErrKeyword(const char *name, FITS::ValueType type, const void *val, const char *errmsg)
construct an error keyword - this happens when a name is invalid (NULL or more than 8 characters) or ...
static void swap8(void *, void *, int)
Variable Length Array Descriptor.
static const ReservedFitsKeyword & comment_item
static int fitssize(FITS::ValueType t)
static int str2fstr(char *, const char *, int)
void spaces(const char *n=0, const char *c=0)
add a spaces line
int err() const
access the error status
ReservedName
FITS Reserved Names.
static void defaultHandler(const char *errMessage, ErrorLevel severity)
The default error handler.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
static FITS::ValueType getfitstype(NoConvert< FitsLogical > x)
STRING and FSTRING are used internally in parsing keywords.