source: Sophya/trunk/SophyaExt/FitsIOServer/fitslocalmap.h@ 2842

Last change on this file since 2842 was 1322, checked in by ansari, 25 years ago

Operateur >> et << pour FITS de localmap et de SphereHealPix - Reza 13/11/2000

File size: 1.3 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
12namespace SOPHYA {
13
14
15/////////////////////////////////////////////////////////////////////////
16// Classe pour la gestion de persistance sur fichiers fits
17/////////////////////////////////////////////////////////////////////////
18
19
20
21template <class T>
22class FITS_LocalMap : public FitsIOHandler {
23
24 public :
25FITS_LocalMap();
26FITS_LocalMap(char inputfile[],int hdunum=0);
27FITS_LocalMap(const LocalMap<T> & obj);
28FITS_LocalMap(LocalMap<T> *obj);
29virtual ~FITS_LocalMap();
30virtual AnyDataObj* DataObj();
31virtual void SetDataObj(AnyDataObj & o);
32inline operator LocalMap<T>() { return(*dobj_); }
33
34protected :
35
36void ReadFromFits(FitsInFile& is);
37void WriteToFits(FitsOutFile& os) ;
38
39 LocalMap<T> * dobj_;
40 bool ownobj_;
41};
42//////////////////////////////////////////////////////////////////
43
44template <class T>
45inline FitsOutFile& operator << (FitsOutFile& fios, LocalMap<T> & lm)
46 { FITS_LocalMap<T> fih(&lm); fih.Write(fios); return (fios); }
47
48template <class T>
49inline FitsInFile& operator >> (FitsInFile& fiis, LocalMap<T> & lm)
50 { FITS_LocalMap<T> fih(&lm); fih.Read(fiis); return (fiis); }
51
52} // Fin du namespace
53
54#endif
Note: See TracBrowser for help on using the repository browser.