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

Last change on this file since 3075 was 2201, checked in by lemeur, 23 years ago

acces au dvlist du fichier fits en lecture

File size: 2.2 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(const 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// Renvoie une reference sur l''objet DVList Associe
33inline const DVList& DVListFromFits() const
34 {
35 return(inFits_->DVListFromFits());
36 }
37
38
39protected:
40
41 // implementation de FitsIOHandler
42 virtual void ReadFromFits(FitsInFile& is) {};
43virtual void WriteToFits(FitsOutFile& os) {};
44
45 private :
46
47inline void InitNull()
48 {
49 inFits_ = NULL;
50 nextLineToBeRead_= 0;
51 }
52 // attributs de classe
53
54 FitsInFile* inFits_;
55 long nextLineToBeRead_;
56 BnTblLine ligne_;
57};
58
59
60//////////////////////////////////////////////////////////////////
61
62
63class FITS_BntblLineWriter : public FitsIOHandler
64{
65
66
67public:
68 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);
69~FITS_BntblLineWriter();
70 void WriteNextLine( BnTblLine& WorkLine);
71
72// Renvoie une reference sur l''objet DVList Associe
73 //inline const DVList& DVListFromFits() const
74 // {
75 // return(outFits_->DVListFromFits());
76 // }
77
78 private :
79
80inline void InitNull()
81 {
82 outFits_ = NULL;
83 nextLineToBeWritten_= 0;
84 }
85
86protected:
87
88 // implementation de FitsIOHandler
89 virtual void ReadFromFits(FitsInFile& is) {};
90virtual void WriteToFits(FitsOutFile& os) {};
91
92
93 // attributs de classe
94
95 FitsOutFile* outFits_;
96 long nextLineToBeWritten_;
97 BnTblLine ligne_;
98};
99
100
101} // Fin du namespace
102
103#endif
Note: See TracBrowser for help on using the repository browser.