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

Last change on this file since 3586 was 3572, checked in by cmv, 17 years ago

char* -> const char* pour regler les problemes de deprecated string const... + comparaison unsigned signed + suppression EVOL_PLANCK rz+cmv 07/02/2009

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