Commit c3f065d3 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Nettoyage du module FitsIOServer, pour enlever sopnamsp.h (pas de using...

Nettoyage du module FitsIOServer, pour enlever sopnamsp.h (pas de using namespace std ou SOPHYA dans les .h), Reza
parent f9af1165
/*
--- SOPHYA software - FitsIOServer module ---
R. Ansari , 2005-2022
(C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
*/
// Classe d'initialisation du module FitsIOServer
#include "sopnamsp.h"
#include "machdefs.h"
#include "fiosinit.h"
#include "fitsmanager.h"
......@@ -23,6 +27,11 @@
Perform registration of fits handlers.
\sa SOPHYA::FitsManager
*/
using namespace std;
namespace SOPHYA {
int FitsIOServerInitiator::FgInit = 0;
// >>>ATTENTION: Reporter ce numero de version ds fitsinoutfile.cc (methode Version())
......@@ -35,9 +44,9 @@ int FitsIOServerInitiator::FgInit = 0;
// Module version number - 2.4 , Dec 2014
// Module version number - 2.5 , Juin 2015 (Adaptation refonte SkyMap - SphericalMaps)
// Module version number - 2.55 , Jan 2018 pour SOPHYVA V=2.5
// Module version number - 2.57 , Mai 2022
// Module version number - 2.60 , Mai 2022 pour SOPHYVA V=2.6
#define FitsIOServer_MOD_VERS 2.57
#define FitsIOServer_MOD_VERS 2.60
FitsIOServerInitiator::FitsIOServerInitiator()
: SophyaInitiator()
......@@ -98,3 +107,5 @@ FitsIOServerInitiator::~FitsIOServerInitiator()
// Reactivation de l'objet statique en Jan 2019
static FitsIOServerInitiator s_fios_init_;
} // FIN namespace SOPHYA
......@@ -38,7 +38,7 @@ static void WriteImageData(FitsInOutFile& fios, const T * d, size_t sz,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<T>::WriteImageData() Error: " ;
std::string msg = "FitsBlockRW<T>::WriteImageData() Error: " ;
msg += buff;
throw FitsIOException(msg);
}
......@@ -58,7 +58,7 @@ static void ReadImageData(FitsInOutFile& fios, T * d, size_t sz,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<T>::ReadImageData() Error: " ;
std::string msg = "FitsBlockRW<T>::ReadImageData() Error: " ;
msg += buff;
throw FitsIOException(msg);
}
......@@ -86,7 +86,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<T>::WriteColumnData() Error: " ;
std::string msg = "FitsBlockRW<T>::WriteColumnData() Error: " ;
msg += buff;
throw FitsIOException(msg);
}
......@@ -113,7 +113,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<T>::ReadColumnData() Error: " ;
std::string msg = "FitsBlockRW<T>::ReadColumnData() Error: " ;
msg += buff;
throw FitsIOException(msg);
}
......@@ -157,7 +157,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<string>::WriteColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<string>::WriteColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -178,7 +178,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<std::string>::WriteColumnData() Error: " ;
std::string msg = "FitsBlockRW<std::string>::WriteColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -203,7 +203,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<string>::ReadColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<string>::ReadColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -221,7 +221,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<std::string>::ReadColumnData() Error: " ;
std::string msg = "FitsBlockRW<std::string>::ReadColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -273,7 +273,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<std::String16>::WriteColumnData() Error: " ;
std::string msg = "FitsBlockRW<std::String16>::WriteColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -297,7 +297,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<String16>::WriteColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<String16>::WriteColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -315,7 +315,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<String16>::ReadColumnData() Error: " ;
std::string msg = "FitsBlockRW<String16>::ReadColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -367,7 +367,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<std::String64>::WriteColumnData() Error: " ;
std::string msg = "FitsBlockRW<std::String64>::WriteColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -391,7 +391,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<String64>::WriteColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<String64>::WriteColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -409,7 +409,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<String64>::ReadColumnData() Error: " ;
std::string msg = "FitsBlockRW<String64>::ReadColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -509,13 +509,13 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<FlagVector16>::WriteColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<FlagVector16>::WriteColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
if ((typecode!=TBIT)&&(typecode!=TBYTE)&&(typecode!=TLOGICAL)) {
sprintf(errormsgbuff,"col=%d typcod=%d",(int)colnum,(int)typecode);
string msg = "FitsBlockRW<FlagVector16>::WriteColumnData() incompatible type ";
std::string msg = "FitsBlockRW<FlagVector16>::WriteColumnData() incompatible type ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -540,7 +540,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<std::FlagVector16>::WriteColumnData() Error: " ;
std::string msg = "FitsBlockRW<std::FlagVector16>::WriteColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -564,13 +564,13 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<FlagVector16>::ReadColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<FlagVector16>::ReadColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
if ((typecode!=TBIT)&&(typecode!=TBYTE)&&(typecode!=TLOGICAL)) {
sprintf(errormsgbuff,"col=%d typcod=%d",(int)colnum,(int)typecode);
string msg = "FitsBlockRW<FlagVector16>::ReadColumnData() incompatible type ";
std::string msg = "FitsBlockRW<FlagVector16>::ReadColumnData() incompatible type ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -588,7 +588,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<std::FlagVector16>::ReadColumnData() Error: " ;
std::string msg = "FitsBlockRW<std::FlagVector16>::ReadColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -642,13 +642,13 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<FlagVector64>::WriteColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<FlagVector64>::WriteColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
if ((typecode!=TBIT)&&(typecode!=TBYTE)&&(typecode!=TLOGICAL)) {
sprintf(errormsgbuff,"col=%d typcod=%d",(int)colnum,(int)typecode);
string msg = "FitsBlockRW<FlagVector64>::WriteColumnData() incompatible type ";
std::string msg = "FitsBlockRW<FlagVector64>::WriteColumnData() incompatible type ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -675,7 +675,7 @@ static void WriteColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<FlagVector64>::WriteColumnData() Error: " ;
std::string msg = "FitsBlockRW<FlagVector64>::WriteColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......@@ -699,13 +699,13 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
if ( status ) {
fits_report_error(stderr, status);
fits_get_errstatus(status, errormsgbuff);
string msg = "FitsBlockRW<FlagVector64>::ReadColumnData() Error in fits_get_coltype() ";
std::string msg = "FitsBlockRW<FlagVector64>::ReadColumnData() Error in fits_get_coltype() ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
if ((typecode!=TBIT)&&(typecode!=TBYTE)&&(typecode!=TLOGICAL)) {
sprintf(errormsgbuff,"col=%d typcod=%d",(int)colnum,(int)typecode);
string msg = "FitsBlockRW<FlagVector64>::ReadColumnData() incompatible type ";
std::string msg = "FitsBlockRW<FlagVector64>::ReadColumnData() incompatible type ";
msg += errormsgbuff;
throw FitsIOException(msg);
}
......@@ -723,7 +723,7 @@ static void ReadColumnData(FitsInOutFile& fios, int colnum, LONGLONG firstrow,
fits_report_error(stderr, status);
char buff[32];
fits_get_errstatus(status, buff);
string msg = "FitsBlockRW<FlagVector64>::ReadColumnData() Error: " ;
std::string msg = "FitsBlockRW<FlagVector64>::ReadColumnData() Error: " ;
msg += buff;
sprintf(buff," kk=%ld",(long)kk); msg += buff;
throw FitsIOException(msg);
......
#include "sopnamsp.h"
/*
--- SOPHYA software - FitsIOServer module ---
Guy Le Meur (LAL) 04/2000
R. Ansari , 2005-2022
(C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
*/
#include "machdefs.h"
#include <stdlib.h>
#include <string.h>
......@@ -13,6 +19,10 @@
SOPHYA objects. This module uses cfitsio library.
*/
using namespace std;
namespace SOPHYA {
void BnTblLine::setFormat(int dc, int fc, int ic, int lc, int bc,int cc, vector<string> names)
{
int nbcols = dc + fc + ic + cc + lc + bc;
......@@ -2584,3 +2594,6 @@ void FitsKeyword::Print()
}
}
}
} // FIN namespace SOPHYA
......@@ -35,9 +35,9 @@ class FitsKeyword
public:
FitsKeyword();
FitsKeyword(string comment);
FitsKeyword(string keyname, string value, string comment);
FitsKeyword(string keyname, string value, string comment, char type);
FitsKeyword(std::string comment);
FitsKeyword(std::string keyname, std::string value, std::string comment);
FitsKeyword(std::string keyname, std::string value, std::string comment, char type);
void writeOnFits(fitsfile* ptr);
void Print();
......@@ -45,11 +45,11 @@ void Print();
private:
char datatype_;
string keyname_;
std::string keyname_;
double dvalue_;
int ivalue_;
string svalue_;
string comment_;
std::string svalue_;
std::string comment_;
};
......@@ -122,8 +122,8 @@ class BufferLine
public :
BufferLine() {;}
BufferLine(const vector<FitsFile::FitsDataType>& types);
inline const vector< pair<FitsFile::FitsDataType, int> >& identificateur() const {return id_;}
BufferLine(const std::vector<FitsFile::FitsDataType>& types);
inline const std::vector< std::pair<FitsFile::FitsDataType, int> >& identificateur() const {return id_;}
inline r_8& r_8Array(int k) { return ddata_[k];}
inline const r_8& r_8Array(int k) const { return ddata_[k];}
inline r_4& r_4Array(int k) { return fdata_[k];}
......@@ -138,8 +138,8 @@ inline const vector< pair<FitsFile::FitsDataType, int> >& identificateur() const
inline int_8& int_8Array(int k) { return ldata_[k];}
inline const int_8& int_8Array(int k) const { return ldata_[k];}
inline string& stringArray(int k) { return cdata_[k];}
inline const string& stringArray(int k) const { return cdata_[k];}
inline std::string& stringArray(int k) { return cdata_[k];}
inline const std::string& stringArray(int k) const { return cdata_[k];}
inline unsigned char& u_charArray(int k) { return bdata_[k];}
inline const unsigned char& u_charArray(int k) const { return bdata_[k];}
......@@ -150,20 +150,20 @@ inline const vector< pair<FitsFile::FitsDataType, int> >& identificateur() const
private :
// la paire contient le type de la variable et le rang dans le tableau
// du type
vector< pair<FitsFile::FitsDataType, int> > id_;
vector<r_8> ddata_;
vector<r_4> fdata_;
vector<int_2> shdata_;
vector<int_4> idata_;
vector<int_8> ldata_;
vector<string> cdata_;
vector<unsigned char> bdata_;
std::vector< std::pair<FitsFile::FitsDataType, int> > id_;
std::vector<r_8> ddata_;
std::vector<r_4> fdata_;
std::vector<int_2> shdata_;
std::vector<int_4> idata_;
std::vector<int_8> ldata_;
std::vector<std::string> cdata_;
std::vector<unsigned char> bdata_;
};
FitsFile();
FitsFile(FitsInOutFile const& fios);
// RzDel virtual ~FitsFile();
static string GetErrStatus(int status);
static std::string GetErrStatus(int status);
inline int statusF() const { return fits_status_;}
inline void firstImageOnPrimaryHeader(bool choice) {imageOnPrimary_=choice;}
inline int currentHeaderIndex() {return hdunum_;}
......@@ -199,23 +199,23 @@ inline fitsfile* fitsfilePtr() const {return fptr_;}
public:
FitsInFile();
FitsInFile(string const & flnm);
FitsInFile(std::string const & flnm);
FitsInFile(const char * flnm);
FitsInFile(FitsInOutFile const& fios);
// virtual ~FitsInFile();
static int NbBlocks(char flnm[]);
int NbBlocks();
static void GetBlockType(char flnm[], int hdunum, FitsExtensionType& typeOfExtension, int& naxis, vector<int>& naxisn, FitsDataType& dataType, DVList& dvl );
static void GetBlockType(char flnm[], int hdunum, FitsExtensionType& typeOfExtension, int& naxis, std::vector<int>& naxisn, FitsDataType& dataType, DVList& dvl );
void ReadHeader(int hdunum);
bool hasKeyword(int hdunum, string keyw);
string getStringKeyword(int hdunum, string keyname,int& retStatus);
bool hasKeyword(int hdunum, std::string keyw);
std::string getStringKeyword(int hdunum, std::string keyname,int& retStatus);
/*! \return a reference on a DVList containing the keywords from FITS file */
inline const DVList& DVListFromFits() const { return dvl_;}
void GetKeywordsFromHeader (int hdunum, list<FitsKeyword>& mots_cles) const;
void GetKeywordsFromHeader (int hdunum, std::list<FitsKeyword>& mots_cles) const;
DVList DVListFromPrimaryHeader() const;
......@@ -244,7 +244,7 @@ inline bool IsFitsImage() const { return (hdutype_ == FitsExtensionType_IMAGE);}
inline int nbDimOfImage() const {return naxis_;}
/*! \return a reference on a vector containing sizes of the NAXIS dimensions : NAXIS1, NAXIS2, NAXIS3 etc. */
inline const vector<int>& dimOfImageAxes() const { return naxisn_;}
inline const std::vector<int>& dimOfImageAxes() const { return naxisn_;}
/*! \return total number of data in the current IMAGE extension */
......@@ -269,12 +269,12 @@ inline bool IsFitsTable() const {return (hdutype_ == FitsExtensionType_ASCII_TBL
static void GetBinTabParameters(fitsfile* fileptr, int& nbcols, int& nrows,
vector<int>& repeat,
vector<string>& noms,
vector<FitsDataType>& types,
vector<int>& taille_des_chaines);
std::vector<int>& repeat,
std::vector<std::string>& noms,
std::vector<FitsDataType>& types,
std::vector<int>& taille_des_chaines);
FitsDataType ColTypeFromFits(int nocol) const;
string ColNameFromFits(int nocol) const;
std::string ColNameFromFits(int nocol) const;
int ColStringLengthFromFits(int nocol) const;
const BufferLine& GetBufferLine(long NoLine);
void GetBinTabLine(int NoLine, double* ddata, float* fdata, int* idata, char
......@@ -316,24 +316,24 @@ void InitNull();
void getHeaderWithSophyaObject();
static void KeywordsIntoDVList(fitsfile* fileptr, DVList& dvl, int hdunum);
static void GetImageParameters (fitsfile* fileptr,FitsDataType& dataType,int& naxis,vector<int>& naxisn);
static void GetImageParameters (fitsfile* fileptr,FitsDataType& dataType,int& naxis,std::vector<int>& naxisn);
FitsDataType imageDataType_; /**< fits-Image parameter (bitpix)*/
int naxis_; /**< fits-Image parameter */
vector<int> naxisn_; /**< fits-Image parameters : sizes of dimensions */
std::vector<int> naxisn_; /**< fits-Image parameters : sizes of dimensions */
int nbData_; /*< fits-Image parameter: number of data */
int nrows_; /**< Bintable parameter */
vector<int> repeat_; /**< Bintable parameter */
std::vector<int> repeat_; /**< Bintable parameter */
int nbcols_; /**< Bintable parameter */
vector<string> noms_; /**< Bintable parameter: column names */
vector<FitsDataType> types_; /**< Bintable parameters: types of columns (D: double, E: float, I: integers, A: char*) */
std::vector<std::string> noms_; /**< Bintable parameter: column names */
std::vector<FitsDataType> types_; /**< Bintable parameters: types of columns (D: double, E: float, I: integers, A: char*) */
DVList dvl_; /**< DVList for transferring keywords */
vector<int> taille_des_chaines_; /**< Bintable parameters: length of the char* variables */
std::vector<int> taille_des_chaines_; /**< Bintable parameters: length of the char* variables */
double dnull_;
float fnull_;
int inull_;
string cnull_;
std::string cnull_;
......@@ -346,7 +346,7 @@ static void GetImageParameters (fitsfile* fileptr,FitsDataType& dataType,int& n
public:
FitsOutFile();
FitsOutFile(string const & flnm, WriteMode wrm = unknown );
FitsOutFile(std::string const & flnm, WriteMode wrm = unknown );
FitsOutFile(const char * flnm, WriteMode wrm = unknown );
FitsOutFile(FitsInOutFile const& fios);
virtual ~FitsOutFile();
......@@ -376,14 +376,14 @@ static void GetImageParameters (fitsfile* fileptr,FitsDataType& dataType,int& n
void makeHeaderBntblOnFits ( string fieldType, vector<string> Noms, int nentries, int tfields, DVList* dvl, string extname, vector<int> taille_des_chaines) ;
void makeHeaderBntblOnFits ( std::string fieldType, std::vector<std::string> Noms, int nentries, int tfields, DVList* dvl, std::string extname, std::vector<int> taille_des_chaines) ;
void appendInputHeader(FitsInFile& headerin, int hdunum);
void writeAppendedHeaderOnFits();
void PrintHeaderToBeAppended();
void insertCommentLineOnHeader(string comment);
void insertKeywordOnHeader(string keyname, double value, string comment);
void insertKeywordOnHeader(string keyname, int value, string comment);
void insertKeywordOnHeader(string keyname, string value, string comment);
void insertCommentLineOnHeader(std::string comment);
void insertKeywordOnHeader(std::string keyname, double value, std::string comment);
void insertKeywordOnHeader(std::string keyname, int value, std::string comment);
void insertKeywordOnHeader(std::string keyname, std::string value, std::string comment);
void PutColToFits(int nocol, int nentries, r_8* donnees) const;
void PutColToFits(int nocol, int nentries, r_4* donnees) const;
void PutColToFits(int nocol, int nentries, int_4* donnees) const;
......@@ -408,25 +408,25 @@ void DVListIntoPrimaryHeader(DVList& dvl) ;
void addDVListOnPrimary();
DVList* dvlToPrimary_; /**< for transferring keywords when creating primary header */
list<FitsKeyword> mots_cles_;
std::list<FitsKeyword> mots_cles_;
};
struct BnTblLine
{
BnTblLine() {}
void setFormat(int dc, int fc, int ic, int lc, int bc, int cc, vector<string> names);
void setFormat(int dc, int fc, int ic, int lc, int bc, int cc, std::vector<std::string> names);
bool sameFormat(const BnTblLine& btl) const;
void Print();
vector<double> ddata_;
vector<float> fdata_;
vector<int> idata_;
vector<string> cdata_;
vector<string> ColName_;
vector<long> ldata_;
vector<unsigned char> bdata_;
std::vector<double> ddata_;
std::vector<float> fdata_;
std::vector<int> idata_;
std::vector<std::string> cdata_;
std::vector<std::string> ColName_;
std::vector<long> ldata_;
std::vector<unsigned char> bdata_;
};
......
/*
--- SOPHYA software - FitsIOServer module ---
R. Ansari , C. Magneville 2005-2022
(C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
*/
#include "machdefs.h"
#include <stdio.h>
......@@ -10,6 +15,8 @@
#include "fitsblkrw.h"
#include "fitshandler.h"
using namespace std;
namespace SOPHYA {
DECL_TEMP_SPEC /* equivalent a template <> , pour SGI-CC en particulier */
......
......@@ -85,7 +85,7 @@ public :
{
T * po = dynamic_cast< T * >(& o);
if (po == NULL) {
string msg = "FitsHandler<T>::SetDataObj() Wrong object type: " ;
std::string msg = "FitsHandler<T>::SetDataObj() Wrong object type: " ;
msg += typeid(o).name();
throw TypeMismatchExc(msg);
}
......
/*
--- SOPHYA software - FitsIOServer module ---
R. Ansari , 2005-2022
(C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
*/
#include "machdefs.h"
#include <stdio.h>
......@@ -11,6 +16,8 @@
#include "fitsblkrw.h"
#include "fitshandler.h"
using namespace std;
namespace SOPHYA {
///////////////////////////////////////////////////////////////////////////
......
/*
--- SOPHYA software - FitsIOServer module ---
R. Ansari , C. Magneville 2005-2022
(C) UPS+LAL IN2P3/CNRS (C) DAPNIA-SPP/CEA
*/
#include "machdefs.h"
#include <stdio.h>
......@@ -12,6 +17,8 @@
#include "fitsblkrw.h"
#include "fitshandler.h"
using namespace std;
namespace SOPHYA {
////////////////////////////////////////////////////////////////
......
......@@ -3,7 +3,6 @@
R. Ansari , 2005-2022
(C) UPS+LAL IN2P3/CNRS (C) IRFU-SPP/CEA
*/
#include "sopnamsp.h"
#include "machdefs.h"
#include "segdatablock.h"
#include "fitsinoutfile.h"
......@@ -12,6 +11,9 @@
#include <string.h>
#include <iostream>
//--- on utilise le namespace std, sans qualification
using namespace std;
namespace SOPHYA {
string FitsTypes::ImageTypeToTypeString(int ityp)
......