00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00032
00039
00040
00045
00046
00056
00057
00058 #ifndef _MJDATABASEMATERIAL_HH
00059 #define _MJDATABASEMATERIAL_HH
00060
00061
00062
00063 #include <string>
00064 #include <vector>
00065 #include "libpq-fe.h"
00066
00067 using namespace std;
00068
00069
00070 class MJDatabaseMaterial
00071 {
00072 public:
00073
00074
00075 MJDatabaseMaterial();
00076
00077 MJDatabaseMaterial(string, double, double, double, int,
00078 string, string);
00079
00080
00081 MJDatabaseMaterial(const MJDatabaseMaterial &);
00082
00083
00084 ~MJDatabaseMaterial();
00085
00086
00087 string GetName() { return fName;}
00088 double GetDensity() { return fDensity; }
00089 double GetTemperature() { return fTemperature;}
00090 double GetPressure() { return fPressure;}
00091 int GetNoComponents() { return fNumOfComponents; }
00092 vector<int> GetNoAtoms() { return fNumAtoms; }
00093 vector<string> GetComponents() { return fComponents;}
00094 vector<double> GetFracMass() { return fFracMass;}
00095 string GetBackground() { return fDefaultBKG; }
00096 string GetComment() { return fComment; }
00097
00098 MJDatabaseMaterial* createMaterial(PGresult *res, int);
00099 void print(ostream&);
00100
00101 friend ostream& operator << (ostream& os, MJDatabaseMaterial & mat);
00102
00103 protected:
00104
00105
00106
00107 private:
00108 string fName;
00109 double fDensity;
00110 double fTemperature;
00111 double fPressure;
00112 int fNumOfComponents;
00113 vector<string> fComponents;
00114 vector<int> fNumAtoms;
00115 vector<double> fFracMass;
00116 string fDefaultBKG;
00117 string fComment;
00118
00119
00120
00121
00122 };
00123 #endif