source: Sophya/trunk/SophyaExt/FitsIOServer/fitsbntbllineRW.h@ 1213

Last change on this file since 1213 was 1209, checked in by ansari, 25 years ago

ecriture ligne a ligne

File size: 1.9 KB
Line 
1// Guy Le Meur 06/2000
2
3
4#ifndef FITSBntblLineRW_SEEN
5#define FITSBntblLineRW_SEEN
6#include "fitsfile.h"
7//#include "xntuple.h"
8
9namespace SOPHYA {
10///////////////////////////////////////////////////////////
11// Lecture ligne par ligne d'une BINTABLE sur fichier FITS
12//
13///////////////////////////////////////////////////////////
14
15class FITS_BntblLineReader : public FitsIOHandler
16{
17
18public:
19FITS_BntblLineReader();
20FITS_BntblLineReader(char inputfile[],int hdunum=2);
21~FITS_BntblLineReader();
22
23BnTblLine& ReadNextLine();
24 inline BnTblLine& GetBnTblLine() {return ligne_;}
25 inline long GetNextLineIndex() const {return nextLineToBeRead_;}
26 inline void SetStartingLineIndex(long n) { nextLineToBeRead_ = n;}
27
28 inline int status() const {return inFits_->statusF();};
29 inline string GetStatus(int status) const {return inFits_->GetErrStatus(status);};
30
31
32
33protected:
34
35 // implementation de FitsIOHandler
36 virtual void ReadFromFits(FitsInFile& is) {};
37virtual void WriteToFits(FitsOutFile& os) {};
38
39 private :
40
41inline void InitNull()
42 {
43 inFits_ = NULL;
44 nextLineToBeRead_= 0;
45 }
46 // attributs de classe
47
48 FitsInFile* inFits_;
49 long nextLineToBeRead_;
50 BnTblLine ligne_;
51};
52
53
54//////////////////////////////////////////////////////////////////
55
56
57class FITS_BntblLineWriter : public FitsIOHandler
58{
59
60public:
61FITS_BntblLineWriter();
62 FITS_BntblLineWriter(char inputfile[],int dc, int fc, int ic, int cc, vector<string> names, WriteMode wrm = clear);
63~FITS_BntblLineWriter();
64 void WriteNextLine( BnTblLine& WorkLine);
65
66 private :
67
68inline void InitNull()
69 {
70 outFits_ = NULL;
71 nextLineToBeWritten_= 0;
72 }
73
74protected:
75
76 // implementation de FitsIOHandler
77 virtual void ReadFromFits(FitsInFile& is) {};
78virtual void WriteToFits(FitsOutFile& os) {};
79
80
81 // attributs de classe
82
83 FitsOutFile* outFits_;
84 long nextLineToBeWritten_;
85 BnTblLine ligne_;
86};
87
88
89} // Fin du namespace
90
91#endif
Note: See TracBrowser for help on using the repository browser.