casa
$Rev:20696$
|
#include <fits.h>
Public Member Functions | |
FitsKeyword (const FitsKeyword &) | |
A word about friends: FitsKeywordList accesses the next and prev pointers and the FitsKeyword constructors. | |
FitsKeyword & | operator= (const FitsKeyword &) |
~FitsKeyword () | |
const char * | name () const |
get info about the name | |
int | namelen () const |
Bool | isreserved () const |
Bool | isindexed () const |
const ReservedFitsKeyword & | kw () const |
int | index () const |
const char * | comm () const |
access the keyword comment | |
int | commlen () const |
int | err () const |
access the error status | |
FITS::ValueType | type () const |
the datatype of the keyword | |
Bool | asBool () const |
access the value of the keyword | |
const char * | asString () const |
int | valStrlen () const |
Int | asInt () const |
float | asFloat () const |
double | asDouble () const |
IComplex | asIComplex () const |
Complex | asComplex () const |
DComplex | asDComplex () const |
const void * | value () const |
FitsKeyword & | operator= (Bool) |
change the value of the keyword | |
FitsKeyword & | operator= (const char *) |
FitsKeyword & | operator= (Int) |
FitsKeyword & | operator= (float) |
FitsKeyword & | operator= (double) |
FitsKeyword & | operator= (IComplex) |
FitsKeyword & | operator= (Complex) |
FitsKeyword & | operator= (DComplex) |
void | comm (const char *) |
change the comment of the keyword | |
void | name (const char *) |
change the name of the keyword | |
Private Member Functions | |
void | del_val () |
void | init (const FitsKeyword &) |
void | setval (const FITS::ValueType &, const void *, int) |
void | setcomm (const char *, int) |
FitsKeyword (const char *, int, FITS::ValueType, const void *, int, const char *, int) | |
private constructors for use by friends | |
FitsKeyword (const ReservedFitsKeyword *, int, FITS::ValueType, const void *, int, const char *, int) | |
constructs reserved keywords parms: resword, index, val, vallen, comm, commlen | |
Static Private Member Functions | |
static void | err (const char *, const FITS::ValueType &, const void *, const char *) |
static void | memchk (void *) |
Private Attributes | |
FitsKeyword * | next_ |
FitsKeyword * | prev_ |
char * | name_ |
the keyword name if name_ is 0, keyword is not a user defined name if ndx is 0, there is no index | |
const ReservedFitsKeyword * | kw_ |
int | ndx |
short | namelen_ |
char * | comm_ |
the keyword comment if comm_ is 0, there is no comment | |
short | commlen_ |
FITS::ValueType | type_ |
the keyword value | |
union { | |
Bool bval | |
Int ival | |
float fval | |
double dval | |
}; | |
void * | val |
short | vallen |
Friends | |
class | FitsKeywordList |
class | FitsParse |
FITS keyword.
A FITS keyword contains a name, a value and a comment.
casa::FitsKeyword::FitsKeyword | ( | const FitsKeyword & | k | ) | [inline] |
A word about friends: FitsKeywordList accesses the next and prev pointers and the FitsKeyword constructors.
FitsParse only accesses the FitsKeyword constructors.
Definition at line 651 of file fits.h.
References init().
casa::FitsKeyword::~FitsKeyword | ( | ) | [inline] |
casa::FitsKeyword::FitsKeyword | ( | const char * | , |
int | , | ||
FITS::ValueType | , | ||
const void * | , | ||
int | , | ||
const char * | , | ||
int | |||
) | [private] |
private constructors for use by friends
constructs user-defined keywords parms: name, namelen, type, val, vallen, comm, commlen
casa::FitsKeyword::FitsKeyword | ( | const ReservedFitsKeyword * | , |
int | , | ||
FITS::ValueType | , | ||
const void * | , | ||
int | , | ||
const char * | , | ||
int | |||
) | [private] |
constructs reserved keywords parms: resword, index, val, vallen, comm, commlen
Bool casa::FitsKeyword::asBool | ( | ) | const [inline] |
Complex casa::FitsKeyword::asComplex | ( | ) | const [inline] |
DComplex casa::FitsKeyword::asDComplex | ( | ) | const [inline] |
double casa::FitsKeyword::asDouble | ( | ) | const [inline] |
Definition at line 701 of file fits.h.
References casa::FITS::BYTE, casa::FITS::DOUBLE, dval, casa::FITS::FLOAT, fval, ival, casa::FITS::LONG, casa::FITS::SHORT, and type().
float casa::FitsKeyword::asFloat | ( | ) | const [inline] |
Definition at line 688 of file fits.h.
References casa::FITS::BYTE, casa::FITS::DOUBLE, dval, casa::FITS::FLOAT, fval, ival, casa::FITS::LONG, casa::FITS::SHORT, and type().
IComplex casa::FitsKeyword::asIComplex | ( | ) | const [inline] |
Int casa::FitsKeyword::asInt | ( | ) | const [inline] |
Definition at line 681 of file fits.h.
References ival, casa::FITS::LONG, and type().
const char * casa::FitsKeyword::asString | ( | ) | const [inline] |
const char * casa::FitsKeyword::comm | ( | ) | const [inline] |
void casa::FitsKeyword::comm | ( | const char * | ) |
change the comment of the keyword
int casa::FitsKeyword::commlen | ( | ) | const [inline] |
void casa::FitsKeyword::del_val | ( | ) | [private] |
Referenced by operator=(), and ~FitsKeyword().
int casa::FitsKeyword::err | ( | ) | const [inline] |
access the error status
Definition at line 674 of file fits.h.
References casa::FITS::ERRWORD, kw(), and name().
static void casa::FitsKeyword::err | ( | const char * | , |
const FITS::ValueType & | , | ||
const void * | , | ||
const char * | |||
) | [static, private] |
int casa::FitsKeyword::index | ( | ) | const [inline] |
void casa::FitsKeyword::init | ( | const FitsKeyword & | ) | [private] |
Referenced by FitsKeyword(), and operator=().
Bool casa::FitsKeyword::isindexed | ( | ) | const [inline] |
Definition at line 668 of file fits.h.
References casa::False, ndx, and casa::True.
Bool casa::FitsKeyword::isreserved | ( | ) | const [inline] |
Definition at line 662 of file fits.h.
References casa::FITS::ERRWORD, casa::False, kw(), name(), casa::True, and casa::FITS::USER_DEF.
Referenced by name().
const ReservedFitsKeyword & casa::FitsKeyword::kw | ( | ) | const [inline] |
static void casa::FitsKeyword::memchk | ( | void * | ) | [static, private] |
const char * casa::FitsKeyword::name | ( | ) | const [inline] |
get info about the name
Definition at line 665 of file fits.h.
References casa::ReservedFitsKeyword::aname(), isreserved(), kw(), name_, and namelen_.
Referenced by err(), and isreserved().
void casa::FitsKeyword::name | ( | const char * | ) |
change the name of the keyword
int casa::FitsKeyword::namelen | ( | ) | const [inline] |
FitsKeyword & casa::FitsKeyword::operator= | ( | const FitsKeyword & | k | ) | [inline] |
FitsKeyword & casa::FitsKeyword::operator= | ( | Bool | x | ) | [inline] |
change the value of the keyword
Definition at line 721 of file fits.h.
References bval, casa::FITS::LOGICAL, and type_.
FitsKeyword& casa::FitsKeyword::operator= | ( | const char * | ) |
FitsKeyword & casa::FitsKeyword::operator= | ( | Int | x | ) | [inline] |
Definition at line 723 of file fits.h.
References ival, casa::FITS::LONG, and type_.
FitsKeyword & casa::FitsKeyword::operator= | ( | float | x | ) | [inline] |
Definition at line 725 of file fits.h.
References casa::FITS::FLOAT, fval, and type_.
FitsKeyword & casa::FitsKeyword::operator= | ( | double | x | ) | [inline] |
Definition at line 727 of file fits.h.
References casa::FITS::DOUBLE, dval, and type_.
FitsKeyword & casa::FitsKeyword::operator= | ( | IComplex | x | ) | [inline] |
Definition at line 729 of file fits.h.
References casa::FITS::ICOMPLEX, type_, and val.
FitsKeyword & casa::FitsKeyword::operator= | ( | Complex | x | ) | [inline] |
Definition at line 731 of file fits.h.
References casa::FITS::COMPLEX, type_, and val.
FitsKeyword & casa::FitsKeyword::operator= | ( | DComplex | x | ) | [inline] |
Definition at line 733 of file fits.h.
References casa::FITS::DCOMPLEX, type_, and val.
void casa::FitsKeyword::setcomm | ( | const char * | , |
int | |||
) | [private] |
void casa::FitsKeyword::setval | ( | const FITS::ValueType & | , |
const void * | , | ||
int | |||
) | [private] |
FITS::ValueType casa::FitsKeyword::type | ( | ) | const [inline] |
int casa::FitsKeyword::valStrlen | ( | ) | const [inline] |
const void* casa::FitsKeyword::value | ( | ) | const |
friend class FitsKeywordList [friend] |
union { ... } [private] |
Definition at line 616 of file fits.h.
Referenced by asBool(), and operator=().
char* casa::FitsKeyword::comm_ [private] |
the keyword comment if comm_ is 0, there is no comment
Definition at line 607 of file fits.h.
Referenced by comm(), operator=(), and ~FitsKeyword().
short casa::FitsKeyword::commlen_ [private] |
double casa::FitsKeyword::dval |
Definition at line 619 of file fits.h.
Referenced by asDouble(), asFloat(), and operator=().
float casa::FitsKeyword::fval |
Definition at line 618 of file fits.h.
Referenced by asDouble(), asFloat(), and operator=().
Definition at line 617 of file fits.h.
Referenced by asDouble(), asFloat(), asInt(), and operator=().
const ReservedFitsKeyword* casa::FitsKeyword::kw_ [private] |
char* casa::FitsKeyword::name_ [private] |
the keyword name if name_ is 0, keyword is not a user defined name if ndx is 0, there is no index
Definition at line 598 of file fits.h.
Referenced by name(), operator=(), and ~FitsKeyword().
short casa::FitsKeyword::namelen_ [private] |
int casa::FitsKeyword::ndx [private] |
Definition at line 600 of file fits.h.
Referenced by index(), and isindexed().
FitsKeyword* casa::FitsKeyword::next_ [private] |
FitsKeyword* casa::FitsKeyword::prev_ [private] |
FITS::ValueType casa::FitsKeyword::type_ [private] |
void* casa::FitsKeyword::val [private] |
Definition at line 621 of file fits.h.
Referenced by asComplex(), asDComplex(), asIComplex(), asString(), and operator=().
short casa::FitsKeyword::vallen [private] |
Definition at line 622 of file fits.h.
Referenced by asString(), and valStrlen().