| 
            Last change
 on this file since 3155 was             3047, checked in by ansari, 19 years ago           | 
        
        
          | 
             
Ajout FitsInOutFile::SkipEmptyFirstHDU() , positionnement sur HDU 2 si HDU 1 vide ds operateur >> lisant des tables + autres petites corrections , Reza 11/08/2006 
 
           | 
        
        
          | 
            File size:
            1.4 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | // Guy Le Meur 08/2000
 | 
|---|
| 2 | 
 | 
|---|
| 3 | 
 | 
|---|
| 4 | #ifndef FITSLOCALMAP_SEEN
 | 
|---|
| 5 | #define FITSLOCALMAP_SEEN
 | 
|---|
| 6 | 
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #include "pexceptions.h" 
 | 
|---|
| 9 | #include "localmap.h"
 | 
|---|
| 10 | #include "fitsfile.h"
 | 
|---|
| 11 | 
 | 
|---|
| 12 | namespace SOPHYA {
 | 
|---|
| 13 | 
 | 
|---|
| 14 | 
 | 
|---|
| 15 | /////////////////////////////////////////////////////////////////////////
 | 
|---|
| 16 | // Classe pour la gestion de persistance sur fichiers fits
 | 
|---|
| 17 | /////////////////////////////////////////////////////////////////////////
 | 
|---|
| 18 | 
 | 
|---|
| 19 | 
 | 
|---|
| 20 | 
 | 
|---|
| 21 | template <class T>
 | 
|---|
| 22 | class FITS_LocalMap : public FitsIOHandler {
 | 
|---|
| 23 | 
 | 
|---|
| 24 |   public :
 | 
|---|
| 25 | FITS_LocalMap();
 | 
|---|
| 26 | FITS_LocalMap(char inputfile[],int hdunum=0);
 | 
|---|
| 27 | FITS_LocalMap(const LocalMap<T> & obj);
 | 
|---|
| 28 | FITS_LocalMap(LocalMap<T> *obj);
 | 
|---|
| 29 | virtual ~FITS_LocalMap();
 | 
|---|
| 30 | virtual AnyDataObj* DataObj();
 | 
|---|
| 31 | virtual   void      SetDataObj(AnyDataObj & o); 
 | 
|---|
| 32 | inline operator LocalMap<T>() { return(*dobj_); }
 | 
|---|
| 33 | 
 | 
|---|
| 34 | virtual int         CheckHandling(AnyDataObj & o) ;
 | 
|---|
| 35 | virtual int         CheckReadability(FitsInOutFile& is);
 | 
|---|
| 36 | virtual FitsHandlerInterface* Clone();
 | 
|---|
| 37 | 
 | 
|---|
| 38 | protected :
 | 
|---|
| 39 | 
 | 
|---|
| 40 | void ReadFromFits(FitsInFile& is);
 | 
|---|
| 41 | void WriteToFits(FitsOutFile& os) ;
 | 
|---|
| 42 | 
 | 
|---|
| 43 |   LocalMap<T> * dobj_;
 | 
|---|
| 44 |   bool ownobj_;
 | 
|---|
| 45 | };
 | 
|---|
| 46 | //////////////////////////////////////////////////////////////////
 | 
|---|
| 47 | 
 | 
|---|
| 48 | template <class T>
 | 
|---|
| 49 | inline FitsInOutFile& operator << (FitsInOutFile& fios, LocalMap<T> & lm)
 | 
|---|
| 50 |   { FITS_LocalMap<T> fih(&lm); fih.Write(fios); return (fios); }
 | 
|---|
| 51 | 
 | 
|---|
| 52 | template <class T>
 | 
|---|
| 53 | inline FitsInOutFile& operator >> (FitsInOutFile& fiis, LocalMap<T> & lm)
 | 
|---|
| 54 |   { FITS_LocalMap<T> fih(&lm); fih.Read(fiis); 
 | 
|---|
| 55 |   fiis.MoveToNextHDU(); return (fiis); }
 | 
|---|
| 56 | 
 | 
|---|
| 57 | } // Fin du namespace
 | 
|---|
| 58 | 
 | 
|---|
| 59 | #endif
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.