For each major version, this page lists the breaking changes, details the underlying rationale, the status in the previous version (e.g. what's there already and what's deprecated), and how to adapt the client code.
The brand new feature brought by version 5.0 is the support for multidimensional columns. This has a few impacts on the public API (e.g. the columns now have a dimension and shape), most of which are backward compatible (but not all of them).
In order to accomodate multidimensional columns, data classes (including Raster) were refactored. The refactoring brings a lot of improvements related to performance and flexibility. Yet, most changes in the API (including the additional template parameters, see below) won't even impact user codes.
In MefFile (breaking):
accessFirst() -> find()select() -> filter()In containers, type aliases are introduced generally without breaking the API, e.g. value_type is added, but Value is kept (though as std::decay_t<value_type> instead of value_type).
Rationale
Standard names are already understood by some users.
Impact on client code
Update names (previous names are kept for backward compatibility in this version).
Variable ColumnInfo::repeatCount becomes method ColumnInfo::repeatCount().
Rationale
The repeat count is not sufficient to describe multidimensional entries, while having both a repeat count and shape would be unsafe.
Impact on client code
No impact at construction.
To read the repeat count value, use ColumnInfo::repeatCount() instead of ColumnInfo::repeatCount.
To update the repeat count, use Column::reshape().
PtrColumn(info, elementCount, data) becomes PtrColumn(info, rowCount, data).
Rationale
Implementation of the data classes was completely refactored for improved performance, more flexibility and easier maintenance (see below). This came with the merging of PtrRaster and VecRaster (which are now mere aliases) and therefore of their constructors.
Impact on client code
Calls to the constructor should be updated.
Raster<T, N> has become Raster<T, N, TContainer>, where the added template parameter allows working with any contiguous container. PtrRaster and VecRaster are no more classes which inherit Raster but typedefs insead: PtrRaster<T, N> = Raster<T, N, T*> and VecRaster<T, N> = Raster<T, N, vector<T>>.
PtrRaster and VecRaster are backward compatible.
Column<T> has become Column<T, N, TContainer>, where the added template parameters allow supporting multidimensional entries and working with any contiguous container. PtrColumn and VecColumn are no more classes which inherit Column but typedefs insead: PtrColumn<T, N> = Column<T, N, T*> and VecColumn<T, N> = Column<T, N, vector<T>>.
The default value of N is 1 to limit impact on client code.
Let alone the change in PtrColumn's constructor described above, PtrColumn and VecColumn are backward compatible.
Impact on client code
None for basic usage.
For user-defined functions which used to return or take a Raster or a Column or a ColumnInfo as parameter, e.g. void f(Column<T>& column), there are several options:
void f(Column<T, N, TContainer>& column);void f(VecColumn<T>& column);void f(TColumn& column) (which is the path taken by EleFits).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.
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.