UltraScan III
us_buffer.h
Go to the documentation of this file.
1 #ifndef US_BUFFER_H
3 #define US_BUFFER_H
4 
5 #include <QtCore>
6 #include "us_extern.h"
7 #include "us_db2.h"
8 
10 
12 {
13  public:
14  QString componentID;
15  QString name;
16  QString unit;
17  double dens_coeff[ 6 ];
18  double visc_coeff[ 6 ];
19  QString range;
20  bool grad_form;
21 
25  static void getAllFromDB ( const QString&, QMap< QString, US_BufferComponent >& );
26 
29  static void getAllFromHD ( QMap< QString, US_BufferComponent >& );
30 
33  static void putAllToHD ( const QMap< QString, US_BufferComponent >& );
34 
37  void getInfoFromDB( US_DB2* = 0 );
38 
39  private:
40  static void component( QXmlStreamReader&, QMap< QString, US_BufferComponent >& );
41 };
42 
44 
46 {
47  public:
48  //int personID; //!< Investigator's ID of for this buffer.
49  QString person;
50  QString bufferID;
51  QString GUID;
52  QString description;
53  double compressibility;
54  double pH;
55  double density;
56  double viscosity;
57  bool manual;
58 
60  QMap< double, double > extinction;
62  QMap< double, double > refraction;
64  QMap< double, double > fluorescence;
65 
67  QList< US_BufferComponent > component;
68  QList< double > concentration;
70  QStringList componentIDs;
71 
72  // Constructor of a null buffer
73  US_Buffer();
74 
78  bool writeToDisk( const QString& ) const;
79 
88  static QString get_filename( const QString& path, const QString& guid,
89  bool& newFile );
90 
94  bool readFromDisk( const QString& );
95 
101  int saveToDB( US_DB2* = 0, const QString = "1" ) const;
102 
107  bool readFromDB( US_DB2*, const QString& );
108 
113  void getSpectrum( US_DB2*, const QString& );
114 
119  void putSpectrum( US_DB2*, const QString& ) const;
120 
124  void compositeCoeffs( double*, double* );
125 
127  void dumpBuffer( void ) const;
128 
129  private:
130  void readBuffer ( QXmlStreamReader& );
131  void readSpectrum( QXmlStreamReader& );
132 };
133 #endif