![]() |
EleFits
4.0.0
A modern C++ API on top of CFitsIO
|
Version 4.0 introduces many changes to the API. Most of them are already in place in version 3.2, but with backward compatibility ensured by aliases. This is done to make transition smoother on client code side. Therefore, in 3.2, the user can use both 3.x and 4.x versions of the API. Items removed from the API in 4.0 are marked deprecated in 3.2.
For each breaking change, this page details the underlying reasons, the status in version 3.2, and how to adapt the client code.
Namespace FitsIO becomes Fits. Prefix EL_Fits (resp. EL_FITSIO) becomes EleFits (resp. ELEFITS). EL_FitsFile becomes EleFits. Underscores in program names are removed.
Rationale
Status in version 3.2
Change not applied: compatibility with 4.0 cannot be anticipated in code which depends on 3.2.
Impact on client code
EL_FitsIO with EleFits in CMakeLists';EL_Fits with EleFits in CMakeLists' and in includes;EL_FITSIO with ELEFITS in macros;FitsIO (e.g. namespace FitsIO or class FitsIOError) with Fits in sources;In addition to file- and HDU-level handlers, additional classes are defined at header or data level. For example, records are accessed through MefFile/RecordHdu/Header instead of MefFile/RecordHdu:
Rationale
SifFile (e.g. no more useless index() method);BintableHdu goes from 57 methods to 15 in BintableColumns);Status in version 3.2
Header- and data-level handlers are implemented. Methods in HDU-level handlers still exist for backward compatibility, although they are marked deprecated.
Impact on client code
Rationale
(Record)Hdu is not responsible anymore for record I/Os;ImageHdu and BintableHdu both extend Hdu.Status in version 3.2
Name has changed. Deprecated alias RecordHdu is provided for backward-compatibility.
Impact on client code
RecordHdu with Hdu, including in include directives.Rationale
RecordMode;Status in version 3.2
Name and scope have changed. A deprecated alias FitsFile::Permission is provided for backward compatibility.
Impact on client code
FitsFile::Permission, SifFile::Permission and MefFile::Permission with FileMode.And it is now a proper class instead of an enum.
Rationale
KeywordCategory.Status in version 3.2
Name has changed. A deprecated alias HduType is provided for backward compatibility.
Impact on client code
HduType with HduCategory.An ImageHdu is always returned by MefFile::primary().
Rationale
RecordHdu (see impact below).Status is version 3.2
Both MefFile::accessPrimary<T>() and MefFile::primary() are implemented.
Impact on client code
MefFile::accessPrimary<Hdu>() and MefFile::accessPrimary<ImageHdu>() with MefFile::access().Rationale
Data classes should ensure data integrity as much as possible. This is not possible with member variables.
Status in version 3.2
Not implemented.
Impact on client code
raster.shape and column.info with raster.shape() and column.info().Most indices in 2.0 were 0-based (e.g. in Raster and Column). A notable exception was the HDU index, which used to follow the CFitsIO convention. Yet, the Fits standard doesn't set any convention for HDU indices (well, HDU indices are not even mentioned in the standard). Therefore, it was decided to homogeneize indexing, and follow the C++ convention instead.
For more details, see On types.