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

Last change on this file since 2901 was 2897, checked in by ansari, 20 years ago

Mise en place de l heritage FitsIOHandler (ancien) de FitsHandlerInterface pour une gestion commune - a partir de FitsManager - Reza 13/01/2006

File size: 1.4 KB
RevLine 
[1181]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
[2897]34virtual int CheckHandling(AnyDataObj & o) ;
35virtual int CheckReadability(FitsInOutFile& is);
36virtual FitsHandlerInterface* Clone();
37
[1181]38protected :
39
40void ReadFromFits(FitsInFile& is);
41void WriteToFits(FitsOutFile& os) ;
42
43 LocalMap<T> * dobj_;
44 bool ownobj_;
45};
46//////////////////////////////////////////////////////////////////
47
[1322]48template <class T>
49inline FitsOutFile& operator << (FitsOutFile& fios, LocalMap<T> & lm)
50 { FITS_LocalMap<T> fih(&lm); fih.Write(fios); return (fios); }
[1181]51
[1322]52template <class T>
53inline FitsInFile& operator >> (FitsInFile& fiis, LocalMap<T> & lm)
54 { FITS_LocalMap<T> fih(&lm); fih.Read(fiis); return (fiis); }
55
[1181]56} // Fin du namespace
57
58#endif
Note: See TracBrowser for help on using the repository browser.