casa
$Rev:20696$
|
linked list of FITS keywords More...
#include <fits.h>
Public Member Functions | |
FitsKeywordList () | |
~FitsKeywordList () | |
FitsKeywordList (const FitsKeywordList &) | |
FitsKeywordList (ConstFitsKeywordList &) | |
FitsKeywordList & | operator= (const FitsKeywordList &) |
void | del () |
delete the current keyword (the thing returned by curr()) from the list | |
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 if necessary to fit the available space. | |
void | mk (FITS::ReservedName k, const char *v=0, const char *c=0) |
void | mk (FITS::ReservedName k, Int v, const char *c=0) |
void | mk (FITS::ReservedName k, long v, const char *c=0) |
void | mk (FITS::ReservedName k, double v, const char *c=0) |
void | mk (int n, FITS::ReservedName k, Bool v, const char *c=0) |
Add (make) an indexed reserved keyword with the given value and optional comment The comment will be truncated if necessary to fit the available space. | |
void | mk (int n, FITS::ReservedName k, const char *v, const char *c=0) |
void | mk (int n, FITS::ReservedName k, Int v, const char *c=0) |
void | mk (int n, FITS::ReservedName k, long v, const char *c=0) |
void | mk (int n, FITS::ReservedName k, double v, const char *c=0) |
void | mk (const char *n, Bool v, const char *c=0) |
Add (make) a user defined keyword with the given name, value and optional comment. | |
void | mk (const char *n, const char *v=0, const char *c=0) |
void | mk (const char *n, Int v, const char *c=0) |
void | mk (const char *n, long v, const char *c=0) |
void | mk (const char *n, float v, const char *c=0) |
void | mk (const char *n, double v, const char *c=0) |
void | mk (const char *n, Int r, Int i, const char *c=0) |
void | mk (const char *n, float r, float i, const char *c=0) |
void | mk (const char *n, double r, double i, const char *c=0) |
void | spaces (const char *n=0, const char *c=0) |
add a spaces line | |
void | comment (const char *n=0, const char *c=0) |
add a comment card | |
void | history (const char *c=0) |
add a history card | |
void | end () |
add the end card. | |
FitsKeyword * | operator() (int) |
Retrieve specific keywords -- these also set the current mark. | |
FitsKeyword * | operator() (const FITS::ReservedName &) |
return first and next non-indexed reserved keyword | |
FitsKeyword * | next (const FITS::ReservedName &) |
FitsKeyword * | operator() (const FITS::ReservedName &, int) |
return first and next indexed reserved keyword | |
FitsKeyword * | next (const FITS::ReservedName &, int) |
FitsKeyword * | operator() (const char *) |
return first and next user-defined keyword | |
FitsKeyword * | next (const char *) |
Bool | isempty () const |
void | first () |
void | last () |
FitsKeyword * | next () |
FitsKeyword * | prev () |
FitsKeyword * | curr () |
void | delete_all () |
int | rules (FitsKeyword &, FITSErrorHandler errhandler=FITSError::defaultHandler) |
int | rules (FITSErrorHandler errhandler=FITSError::defaultHandler) |
Bool | basic_rules () |
void | parse (const char *, int) |
For parsing a single string. | |
int | no_parse_errs () const |
const char * | parse_err (int) const |
void | insert (FitsKeyword &) |
Private Member Functions | |
FitsKeyword & | make (const char *nm, FITS::ValueType t, const void *v, const char *c) |
FitsKeyword & | make (FITS::ReservedName nm, FITS::ValueType t, const void *v, const char *c) |
FitsKeyword & | make (int ind, FITS::ReservedName nm, FITS::ValueType t, const void *v, const char *c) |
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 a string value is too long (more than 69 characters). | |
Private Attributes | |
FitsKeyword * | beg_ |
FitsKeyword * | end_ |
FitsKeyword * | pos |
int | total |
int | cursor |
FitsParse | card |
linked list of FITS keywords
A linked list of FITS keywords.
casa::FitsKeywordList::FitsKeywordList | ( | ) | [inline] |
casa::FitsKeywordList::~FitsKeywordList | ( | ) | [inline] |
Definition at line 877 of file fits.h.
References delete_all().
void casa::FitsKeywordList::comment | ( | const char * | n = 0 , |
const char * | c = 0 |
||
) | [inline] |
add a comment card
Definition at line 943 of file fits.h.
References casa::FITS::COMMENT, insert(), make(), and casa::FITS::NOVALUE.
Referenced by casa::HeaderDataUnit::comment().
FitsKeyword * casa::FitsKeywordList::curr | ( | ) | [inline] |
Definition at line 881 of file fits.h.
References pos.
Referenced by casa::ConstFitsKeywordList::curr(), and casa::HeaderDataUnit::currkw().
void casa::FitsKeywordList::del | ( | ) |
delete the current keyword (the thing returned by curr()) from the list
void casa::FitsKeywordList::delete_all | ( | ) |
Referenced by ~FitsKeywordList().
void casa::FitsKeywordList::end | ( | ) | [inline] |
add the end card.
This must be at the end of the list.
Definition at line 949 of file fits.h.
References casa::FITS::END, insert(), make(), and casa::FITS::NOVALUE.
void casa::FitsKeywordList::first | ( | ) | [inline] |
Definition at line 879 of file fits.h.
References beg_, cursor, and pos.
Referenced by casa::ConstFitsKeywordList::first(), casa::HeaderDataUnit::firstkw(), and operator()().
void casa::FitsKeywordList::history | ( | const char * | c = 0 | ) | [inline] |
add a history card
Definition at line 947 of file fits.h.
References casa::FITS::HISTORY, insert(), make(), and casa::FITS::NOVALUE.
Referenced by casa::HeaderDataUnit::history().
void casa::FitsKeywordList::insert | ( | FitsKeyword & | ) |
Bool casa::FitsKeywordList::isempty | ( | ) | const [inline] |
Definition at line 878 of file fits.h.
References casa::False, total, and casa::True.
Referenced by casa::ConstFitsKeywordList::isempty().
void casa::FitsKeywordList::last | ( | ) | [inline] |
Definition at line 880 of file fits.h.
References cursor, end_, pos, and total.
Referenced by casa::ConstFitsKeywordList::last(), and casa::HeaderDataUnit::lastkw().
FitsKeyword& casa::FitsKeywordList::make | ( | const char * | nm, |
FITS::ValueType | t, | ||
const void * | v, | ||
const char * | c | ||
) | [private] |
FitsKeyword& casa::FitsKeywordList::make | ( | FITS::ReservedName | nm, |
FITS::ValueType | t, | ||
const void * | v, | ||
const char * | c | ||
) | [private] |
FitsKeyword& casa::FitsKeywordList::make | ( | int | ind, |
FITS::ReservedName | nm, | ||
FITS::ValueType | t, | ||
const void * | v, | ||
const char * | c | ||
) | [private] |
FitsKeyword& casa::FitsKeywordList::makeErrKeyword | ( | const char * | name, |
FITS::ValueType | type, | ||
const void * | val, | ||
const char * | errmsg | ||
) | [private] |
construct an error keyword - this happens when a name is invalid (NULL or more than 8 characters) or a string value is too long (more than 69 characters).
It is the responsibility of the caller to the several mk functions to ensure that that doesn't happen. By the time it gets here, it is assumed that such problems are true errors. This is used by the private make functions.
void casa::FitsKeywordList::mk | ( | FITS::ReservedName | k, |
Bool | v, | ||
const char * | c = 0 |
||
) | [inline] |
Add (make) a reserved keyword with the given value and optional comment The comment will be truncated if necessary to fit the available space.
FitsKeyword constructors for non-indexed Reserved keywords.
String values must be less than 69 characters. String values longer than that will result in an ERROR keyword instead of the desired keyword.
Definition at line 895 of file fits.h.
References insert(), casa::FITS::LOGICAL, and make().
Referenced by casa::HeaderDataUnit::mk().
void casa::FitsKeywordList::mk | ( | FITS::ReservedName | k, |
const char * | v = 0 , |
||
const char * | c = 0 |
||
) | [inline] |
Definition at line 897 of file fits.h.
References insert(), make(), and casa::FITS::STRING.
void casa::FitsKeywordList::mk | ( | FITS::ReservedName | k, |
Int | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 899 of file fits.h.
References insert(), casa::FITS::LONG, and make().
void casa::FitsKeywordList::mk | ( | FITS::ReservedName | k, |
long | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 901 of file fits.h.
References insert(), casa::FITS::LONG, and make().
void casa::FitsKeywordList::mk | ( | FITS::ReservedName | k, |
double | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 903 of file fits.h.
References casa::FITS::DOUBLE, insert(), and make().
void casa::FitsKeywordList::mk | ( | int | n, |
FITS::ReservedName | k, | ||
Bool | v, | ||
const char * | c = 0 |
||
) | [inline] |
Add (make) an indexed reserved keyword with the given value and optional comment The comment will be truncated if necessary to fit the available space.
FitsKeyword constructors for indexed Reserved keywords.
String values must be less than 69 characters. String values longer than that will result in an ERROR keyword instead of the desired keyword.
Definition at line 906 of file fits.h.
References insert(), casa::FITS::LOGICAL, and make().
void casa::FitsKeywordList::mk | ( | int | n, |
FITS::ReservedName | k, | ||
const char * | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 909 of file fits.h.
References insert(), make(), and casa::FITS::STRING.
void casa::FitsKeywordList::mk | ( | int | n, |
FITS::ReservedName | k, | ||
Int | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 911 of file fits.h.
References insert(), casa::FITS::LONG, and make().
void casa::FitsKeywordList::mk | ( | int | n, |
FITS::ReservedName | k, | ||
long | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 913 of file fits.h.
References insert(), casa::FITS::LONG, and make().
void casa::FitsKeywordList::mk | ( | int | n, |
FITS::ReservedName | k, | ||
double | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 915 of file fits.h.
References casa::FITS::DOUBLE, insert(), and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
Bool | v, | ||
const char * | c = 0 |
||
) | [inline] |
Add (make) a user defined keyword with the given name, value and optional comment.
FitsKeyword constructors for User-Defined keywords.
The comment will be truncated if necessary to fit the available space. The name must be no longer than 8 characters. Names longer than that will result in an ERROR keyword instead of the desired keyword. String values must no longer than 69 characters. String values longer than that will result in an ERROR keyword instead of the desired keyword.
Definition at line 918 of file fits.h.
References insert(), casa::FITS::LOGICAL, and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
const char * | v = 0 , |
||
const char * | c = 0 |
||
) | [inline] |
Definition at line 920 of file fits.h.
References insert(), make(), and casa::FITS::STRING.
void casa::FitsKeywordList::mk | ( | const char * | n, |
Int | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 922 of file fits.h.
References insert(), casa::FITS::LONG, and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
long | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 924 of file fits.h.
References insert(), casa::FITS::LONG, and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
float | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 926 of file fits.h.
References casa::FITS::FLOAT, insert(), and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
double | v, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 928 of file fits.h.
References casa::FITS::DOUBLE, insert(), and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
Int | r, | ||
Int | i, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 930 of file fits.h.
References casa::FITS::ICOMPLEX, insert(), and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
float | r, | ||
float | i, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 933 of file fits.h.
References casa::FITS::COMPLEX, insert(), and make().
void casa::FitsKeywordList::mk | ( | const char * | n, |
double | r, | ||
double | i, | ||
const char * | c = 0 |
||
) | [inline] |
Definition at line 935 of file fits.h.
References casa::FITS::DCOMPLEX, insert(), and make().
FitsKeyword* casa::FitsKeywordList::next | ( | const FITS::ReservedName & | ) |
Referenced by casa::ConstFitsKeywordList::next(), and casa::HeaderDataUnit::nextkw().
FitsKeyword* casa::FitsKeywordList::next | ( | const FITS::ReservedName & | , |
int | |||
) |
FitsKeyword* casa::FitsKeywordList::next | ( | const char * | ) |
Referenced by operator()().
int casa::FitsKeywordList::no_parse_errs | ( | ) | const [inline] |
Definition at line 890 of file fits.h.
References card, and casa::FitsParse::no_errs().
FitsKeyword* casa::FitsKeywordList::operator() | ( | int | ) |
Retrieve specific keywords -- these also set the current mark.
return the i-th keyword -- keyword numbering starts with 0
FitsKeyword * casa::FitsKeywordList::operator() | ( | const FITS::ReservedName & | n | ) | [inline] |
FitsKeyword * casa::FitsKeywordList::operator() | ( | const FITS::ReservedName & | n, |
int | ndx | ||
) | [inline] |
FitsKeyword * casa::FitsKeywordList::operator() | ( | const char * | w | ) | [inline] |
FitsKeywordList& casa::FitsKeywordList::operator= | ( | const FitsKeywordList & | ) |
void casa::FitsKeywordList::parse | ( | const char * | s, |
int | l | ||
) | [inline] |
For parsing a single string.
Definition at line 888 of file fits.h.
References card, insert(), and casa::FitsParse::parse().
const char * casa::FitsKeywordList::parse_err | ( | int | n | ) | const [inline] |
Definition at line 891 of file fits.h.
References card, and casa::FitsParse::err().
Referenced by casa::ConstFitsKeywordList::prev(), and casa::HeaderDataUnit::prevkw().
int casa::FitsKeywordList::rules | ( | FitsKeyword & | , |
FITSErrorHandler | errhandler = FITSError::defaultHandler |
||
) |
int casa::FitsKeywordList::rules | ( | FITSErrorHandler | errhandler = FITSError::defaultHandler | ) |
void casa::FitsKeywordList::spaces | ( | const char * | n = 0 , |
const char * | c = 0 |
||
) | [inline] |
add a spaces line
Additional keyword constructors for commentary, etc.
Definition at line 939 of file fits.h.
References insert(), make(), casa::FITS::NOVALUE, and casa::FITS::SPACES.
Referenced by casa::HeaderDataUnit::spaces().
FitsKeyword* casa::FitsKeywordList::beg_ [private] |
FitsParse casa::FitsKeywordList::card [private] |
Definition at line 870 of file fits.h.
Referenced by no_parse_errs(), parse(), and parse_err().
int casa::FitsKeywordList::cursor [private] |
FitsKeyword* casa::FitsKeywordList::end_ [private] |
FitsKeyword* casa::FitsKeywordList::pos [private] |
int casa::FitsKeywordList::total [private] |