Class HduMoveGuard¶
Defined in File fits.h
Class Documentation¶
-
class
HduMoveGuard
¶ RAII scoped guard for moving the HDU in a Fits object.
This class attempts to ensure that the HDU state of a
Fits
object is restored when the guard class goes out of scope, even in the presence of exceptions. (In practice, resetting the HDU can only fail if theFits
object has become sufficiently corrupted that it’s no longer usable at all).Public Functions
-
HduMoveGuard
()¶
-
HduMoveGuard
(HduMoveGuard const&)¶
-
HduMoveGuard
(HduMoveGuard&&)¶
-
HduMoveGuard &
operator=
(HduMoveGuard const&)¶
-
HduMoveGuard &
operator=
(HduMoveGuard&&)¶
-
HduMoveGuard
(Fits &fits, int hdu, bool relative = false)¶ Create a guard object and set the HDU of the given Fits object at the same time.
- Parameters
[inout] fits
: FITS file pointer to manipulate.[in] hdu
: HDU index moved to within the lifetime of the guard object (0 is primary).[in] relative
: If True, interprethdu
as relative to the current HDU rather than an absolute index.
-
~HduMoveGuard
()¶
-
void
disable
()¶ Disable the guard, leaving the HDU at its current state at destruction.
-