source: Sophya/trunk/SophyaExt/FitsIOServer/fitsswapper.h@ 2785

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

Petite correction suite compil avec SGI-CC , Reza 30 mai 2005

File size: 1.3 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Gestion de block de donnees swapable
3// C. Magneville R. Ansari Mai 2005
4// LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA
5#ifndef FITSSWAPPER_H
6#define FITSSWAPPER_H
7
8
9#include "machdefs.h"
10#include "swsegdb.h"
11#include "FitsIO/fitsio.h"
12
13namespace SOPHYA {
14/*!
15 \class SOPHYA::FITSDataSwapper
16 \ingroup FitsIOServer
17 Implementation of SOPHYA::DataSwapperInterface interface on FITS streams
18 (fitsfile *) to be used with SOPHYA::SwSegDataBlock classes.
19*/
20
21template <class T>
22class FITSDataSwapper : public DataSwapperInterface<T> {
23public:
24 FITSDataSwapper();
25 FITSDataSwapper(fitsfile * is, int coli, fitsfile * os=NULL, int colo=0);
26
27 inline fitsfile * InStream() { return fitsis; }
28 inline fitsfile * OutStream() { return fitsos; }
29 void SetInStream(fitsfile * is, int col);
30 void SetOutStream(fitsfile * os, int col);
31
32 // Operateur = , on recopie les pointeurs des streams
33 FITSDataSwapper<T>& operator = (FITSDataSwapper<T> const & a);
34
35 virtual int_8 WriteToSwap(const T * d, size_t sz, int_8 idx, int_8 oswp=0, bool osw=false);
36 virtual void ReadFromSwap(int_8 idx, int_8 swp, T* d, size_t sz);
37
38protected:
39 fitsfile * fitsos;
40 int colos, hduos;
41 long rowos;
42 fitsfile * fitsis;
43 int colis, hduis;
44};
45
46} // Fin du namespace
47
48#endif
Note: See TracBrowser for help on using the repository browser.