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

Last change on this file was 3493, checked in by ansari, 17 years ago

1/ Ajout methodes FitsArrayHandler<T>::ReadAtOffset() WriteAtOffset() pour lecture/ecriture de tableaux <> HDU IMAGE par morceaux
2/ Ajout entete commentaire avec copyright LAL+DAPNIA dans les fichiers .h

Reza 30/04/2008

File size: 1.6 KB
Line 
1/*
2 --- SOPHYA software - FitsIOServer module ---
3 Guy Le Meur 08/2000 R. Ansari , 2006
4 (C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
5*/
6#ifndef FITSLOCALMAP_SEEN
7#define FITSLOCALMAP_SEEN
8
9
10#include "pexceptions.h"
11#include "localmap.h"
12#include "fitsfile.h"
13
14namespace SOPHYA {
15
16
17/////////////////////////////////////////////////////////////////////////
18// Classe pour la gestion de persistance sur fichiers fits
19/////////////////////////////////////////////////////////////////////////
20
21
22
23template <class T>
24class FITS_LocalMap : public FitsIOHandler {
25
26 public :
27FITS_LocalMap();
28FITS_LocalMap(char inputfile[],int hdunum=0);
29FITS_LocalMap(const LocalMap<T> & obj);
30FITS_LocalMap(LocalMap<T> *obj);
31virtual ~FITS_LocalMap();
32virtual AnyDataObj* DataObj();
33virtual void SetDataObj(AnyDataObj & o);
34inline operator LocalMap<T>() { return(*dobj_); }
35
36virtual int CheckHandling(AnyDataObj & o) ;
37virtual int CheckReadability(FitsInOutFile& is);
38virtual FitsHandlerInterface* Clone();
39
40protected :
41
42void ReadFromFits(FitsInFile& is);
43void WriteToFits(FitsOutFile& os) ;
44
45 LocalMap<T> * dobj_;
46 bool ownobj_;
47};
48//////////////////////////////////////////////////////////////////
49
50template <class T>
51inline FitsInOutFile& operator << (FitsInOutFile& fios, LocalMap<T> & lm)
52 { FITS_LocalMap<T> fih(&lm); fih.Write(fios); return (fios); }
53
54template <class T>
55inline FitsInOutFile& operator >> (FitsInOutFile& fiis, LocalMap<T> & lm)
56 { FITS_LocalMap<T> fih(&lm); fih.Read(fiis);
57 fiis.MoveToNextHDU(); return (fiis); }
58
59} // Fin du namespace
60
61#endif
Note: See TracBrowser for help on using the repository browser.