18 #include "FitsError.h"
207 WrongKeywordValueType (
const String& diag,
bool silent =
true);
219 virtual std::ostream & put (std::ostream &s)
const = 0;
221 virtual void write ();
230 const String&
comment ()
const;
231 const String&
name ()
const;
235 template <
typename T>
236 T& value(T& val)
const;
238 template <
typename T>
244 virtual void copy (
const Keyword& right);
245 virtual bool compare (
const Keyword &right)
const;
264 friend std::ostream &operator << (std::ostream &s,
const Keyword &right);
266 #ifndef SPEC_TEMPLATE_IMP_DEFECT
267 #ifndef SPEC_TEMPLATE_DECL_DEFECT
268 template <>
float& Keyword::value(
float& val)
const;
269 template <>
double& Keyword::value(
double& val)
const;
270 template <>
int& Keyword::value(
int& val)
const;
287 inline void Keyword::setParent (HDU* parent)
ValueType keytype() const
return the type of a keyword
Definition: Keyword.h:292
virtual ~Keyword()
virtual destructor
Definition: Keyword.cxx:53
const String & comment() const
return the comment field of the keyword
Definition: Keyword.h:307
virtual Keyword * clone() const =0
virtual copy constructor
const String & name() const
return the name of a keyword
Definition: Keyword.h:312
Abstract base class defining the interface for Keyword objects.
Definition: Keyword.h:197
Base class for all HDU [Header-Data Unit] objects.
Definition: HDU.h:543
virtual void write()
left in for historical reasons, this seldom needs to be called by users
Definition: Keyword.cxx:95
FitsException is the base class for all exceptions thrown by this library.
Definition: FitsError.h:93
Keyword(const Keyword &right)
copy constructor
Definition: Keyword.cxx:36
ValueType
CCfits value types and their CFITSIO equivalents (in caps)
Definition: CCfits.h:79
std::ostream & operator<<(std::ostream &s, const Column &right)
output operator for Column objects.
Definition: Column.h:1310
const HDU * parent() const
return a pointer to parent HDU.
Definition: Keyword.h:302
bool operator==(const Keyword &right) const
equality operator
Definition: Keyword.cxx:65
bool operator!=(const Keyword &right) const
inequality operator
Definition: Keyword.cxx:70
void setValue(const T &newValue)
modify the value of an existing Keyword and write it to the file
Definition: KeywordT.h:44
fitsfile * fitsPointer() const
return a pointer to the FITS file containing the parent HDU.
Definition: Keyword.cxx:107
Keyword & operator=(const Keyword &right)
assignment operator
Definition: Keyword.cxx:58