00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_FORMAT_BRUKER1DFILE_H 00006 #define BALL_FORMAT_BRUKER1DFILE_H 00007 00008 #ifndef BALL_FORMAT_JCAMPFILE_H 00009 # include <BALL/FORMAT/JCAMPFile.h> 00010 #endif 00011 00012 #ifndef BALL_DATATYPE_REGULARDATA1D_H 00013 # include <BALL/DATATYPE/regularData1D.h> 00014 #endif 00015 00016 namespace BALL 00017 { 00022 class BALL_EXPORT Bruker1DFile 00023 : public File 00024 { 00025 public: 00026 00030 00033 Bruker1DFile(); 00034 00038 Bruker1DFile(const String& name, OpenMode open_mode = std::ios::in | std::ios::binary) 00039 throw(Exception::FileNotFound); 00040 00042 virtual ~Bruker1DFile(); 00043 00045 00048 00052 void read(const String& name); 00053 00055 void read(); 00056 00059 const RegularData1D& getData() const { return spectrum_; } 00060 00062 const JCAMPFile::EntryMap& getParameters() const { return pars_.getEntries();} 00063 00065 const JCAMPFile::HeaderMap& getHeader() const { return pars_.getHeader();} 00066 00068 00069 private: 00070 const Bruker1DFile& operator = (const Bruker1DFile& file) ; 00071 00072 protected: 00073 00074 Size min_; 00075 Size max_; 00076 00078 JCAMPFile pars_; 00079 00080 RegularData1D spectrum_; 00081 }; 00082 } 00083 00084 #endif // BALL_FORMAT_BRUKER1DFILE_H