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

Last change on this file since 2174 was 1359, checked in by lemeur, 25 years ago

extension bntblLineRW aux long et byte

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