Index: trunk/SophyaExt/FitsIOServer/fitsfile.h
===================================================================
--- trunk/SophyaExt/FitsIOServer/fitsfile.h	(revision 1183)
+++ trunk/SophyaExt/FitsIOServer/fitsfile.h	(revision 1193)
@@ -12,8 +12,51 @@
 namespace SOPHYA {
 
+struct BnTblLine 
+ {
+BnTblLine() {}
+void setFormat(int dc, int fc, int ic, int cc, vector<string> names)
+   {
+    int nbcols = dc + fc + ic + cc;
+    ColName_ = vector<string>(nbcols);
+     for (int k=0; k < nbcols; k++) ColName_ = names;
+    if (dc >0) ddata_ = vector<double>(dc);
+    if (fc >0) fdata_ = vector<float>(fc);
+    if (ic >0) idata_ = vector<int>(fc);
+    if (cc >0) cdata_ = vector<string>(fc);
+   }
+   void Print()
+   {
+     int k;
+     int compt = 0;
+     cout << " ********* ligne ************* " << endl;
+     cout << " *** noms de variables  " << endl;
+     for (k=0; k < compt + ColName_.size(); k++) cout << ColName_[k] << " ";
+     cout << endl;
+     cout << " *** variables doubles  " << endl;
+     for (k=0; k < ddata_.size(); k++) cout << ddata_[k] << " ";
+     cout << endl;
+     cout << " *** variables float  " << endl;
+     for (k=0; k < fdata_.size(); k++) cout << fdata_[k] << " ";
+     cout << endl;
+     cout << " *** variables int  " << endl;
+     for (k=0; k < idata_.size(); k++) cout << idata_[k] << " ";
+     cout << endl;
+     cout << " *** variables string  " << endl;
+     for (k=0; k < cdata_.size(); k++) cout << cdata_[k] << " ";
+     cout << endl;
+     cout << " ***************************** " << endl;
+   }
+  vector<double> ddata_;
+  vector<float>  fdata_;
+  vector<int>    idata_;
+  vector<string>  cdata_;
+  vector<string> ColName_;
+
+ };
+
  class FitsFile;
  class FitsInFile;
  class FitsOutFile;
-
+ enum WriteMode {append, clear, unknown};
 
 
@@ -88,9 +131,6 @@
 calls the method 'WriteToFits' from the inherited  object
 
-\param <WriteMode>  string , WriteMode = "clear" -> if alreadyy exists, the file will be overwrited (else created) ; WriteMode = "append" -> further objects will be appended to the file if it exists (else : file created). Otherwise, file created if does not exist, else : exception. (the last situation is the default)
-
-
 */ 
-  void   Write(char flnm[], string WriteMode= string("unknown")) ;
+  void   Write(char flnm[]) ;
 
   /*!
@@ -106,5 +146,5 @@
   friend class FitsInFile;
   friend class FitsOutFile;
-
+  private :
   };
 
@@ -262,4 +302,8 @@
   void GetBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char
 ** cdata) ;
+  /*!
+get the NoLine-th 'line'  from the current BINTABLE extension on FITS file,
+  */
+  void GetBinTabLine(long NoLine, BnTblLine& ligne) ;
 
   /*!
@@ -358,6 +402,12 @@
 
  public:
+
+
    FitsOutFile();
-   FitsOutFile(char flnm[], string WriteMode= string("unknown"));
+   /*!
+\param <WriteMode>  enum , WriteMode = clear -> if alreadyy exists, the file will be overwritten (else created) ; WriteMode = append -> further objects will be appended to the file if it exists (else : file created). WriteMode = unknown -> file created if does not exist, else : exception. (the last situation is the default)
+
+   */
+   FitsOutFile(char flnm[], WriteMode wrm = unknown );
    ~FitsOutFile() { ;};
    inline void InitNull() {imageOnPrimary_=false;}
@@ -414,5 +464,5 @@
 \param <taille_des_chaines> vector containing the number of characters of  data  for each char* typed column, with order of appearance in 'fieldType'
    */
-  void makeHeaderBntblOnFits ( char* fieldType, char** Noms, int nentries, int tfields, DVList &dvl, char* extname,  vector<int> taille_des_chaines) ;
+   void makeHeaderBntblOnFits ( string fieldType, vector<string> Noms, int nentries, int tfields, DVList &dvl, string extname,  vector<int> taille_des_chaines) ;
 
   /*! write double data from array 'donnees ' on column number 'nocol' of a BINTABLE  extension.
@@ -430,4 +480,7 @@
   /*! same as previous method with char* data */
   void putColToFits(int nocol, int nentries, char** donnees) const;
+
+  void putBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char ** cdata) const;
+
 
 /////////////////////////////////////////////////////////////
