lsst.afw g9029821c7d+231b49cb4f
Public Member Functions | List of all members
lsst::afw::fits::HduMoveGuard Class Reference

RAII scoped guard for moving the HDU in a Fits object. More...

#include <fits.h>

Public Member Functions

 HduMoveGuard ()=delete
 
 HduMoveGuard (HduMoveGuard const &)=delete
 
 HduMoveGuard (HduMoveGuard &&)=delete
 
HduMoveGuardoperator= (HduMoveGuard const &)=delete
 
HduMoveGuardoperator= (HduMoveGuard &&)=delete
 
 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. More...
 
 ~HduMoveGuard ()
 
void disable ()
 Disable the guard, leaving the HDU at its current state at destruction. More...
 

Detailed Description

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 the Fits object has become sufficiently corrupted that it's no longer usable at all).

Definition at line 737 of file fits.h.

Constructor & Destructor Documentation

◆ HduMoveGuard() [1/4]

lsst::afw::fits::HduMoveGuard::HduMoveGuard ( )
delete

◆ HduMoveGuard() [2/4]

lsst::afw::fits::HduMoveGuard::HduMoveGuard ( HduMoveGuard const &  )
delete

◆ HduMoveGuard() [3/4]

lsst::afw::fits::HduMoveGuard::HduMoveGuard ( HduMoveGuard &&  )
delete

◆ HduMoveGuard() [4/4]

lsst::afw::fits::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
[in,out]fitsFITS file pointer to manipulate.
[in]hduHDU index moved to within the lifetime of the guard object (0 is primary).
[in]relativeIf True, interpret hdu as relative to the current HDU rather than an absolute index.

Definition at line 1726 of file fits.cc.

◆ ~HduMoveGuard()

lsst::afw::fits::HduMoveGuard::~HduMoveGuard ( )

Definition at line 1734 of file fits.cc.

Member Function Documentation

◆ disable()

void lsst::afw::fits::HduMoveGuard::disable ( )
inline

Disable the guard, leaving the HDU at its current state at destruction.

Definition at line 764 of file fits.h.

◆ operator=() [1/2]

HduMoveGuard & lsst::afw::fits::HduMoveGuard::operator= ( HduMoveGuard &&  )
delete

◆ operator=() [2/2]

HduMoveGuard & lsst::afw::fits::HduMoveGuard::operator= ( HduMoveGuard const &  )
delete

The documentation for this class was generated from the following files: