Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef MODE_H
00029 #define MODE_H
00030
00031 #include <QGpCoreTools.h>
00032 #include "QGpCoreWaveDLLExport.h"
00033
00034 namespace QGpCoreWave {
00035
00036 class QGPCOREWAVE_EXPORT Mode : public XMLClass
00037 {
00038 TRANSLATIONS("Mode");
00039 public:
00040 enum Polarisation {Vertical=1, Radial=2, Rayleigh=3, Transverse=4, Love=5};
00041 enum Slowness {Phase=0, Group=1};
00042
00043 inline Mode();
00044 inline Mode(Slowness s, Polarisation p, int index);
00045 inline Mode(Polarisation p, int ringIndex, int index);
00046 inline Mode(const Mode& o);
00047
00048 virtual const QString& xml_tagName() const {return xmlModeTag;}
00049 static const QString xmlModeTag;
00050
00051 bool operator==(const Mode& o) const;
00052
00053 void setPolarisation(Polarisation p) {_polarisation=p;}
00054 void setPolarisation(QString p);
00055 Polarisation polarisation() const {return _polarisation;}
00056 QString polarisationString() const;
00057
00058 void setSlowness(Slowness s) {_slowness=s;}
00059 void setSlowness(QString s);
00060 Slowness slowness() const {return _slowness;}
00061 QString slownessString() const;
00062
00063 void setRingIndex(int i) {_ringIndex=i;}
00064 int ringIndex() const {return _ringIndex;}
00065
00066 void setIndex(int i) {_index=i;}
00067 int index() const {return _index;}
00068 QString indexString() const;
00069 QString toString() const;
00070 protected:
00071 void xml_writeProperties(XML_WRITEPROPERTIES_ARGS) const;
00072 XMLMember xml_member(XML_MEMBER_ARGS);
00073 bool xml_setProperty(XML_SETPROPERTY_ARGS);
00074 private:
00075 Slowness _slowness;
00076 Polarisation _polarisation;
00077 int _ringIndex;
00078 int _index;
00079 };
00080
00081 inline Mode::Mode()
00082 {
00083 TRACE;
00084 _polarisation=Rayleigh;
00085 _slowness=Phase;
00086 _ringIndex=0;
00087 _index=0;
00088 }
00089
00090 inline Mode::Mode(Polarisation p, int ringIndex, int index)
00091 {
00092 TRACE;
00093 _polarisation=p;
00094 _slowness=Phase;
00095 _ringIndex=ringIndex;
00096 _index=index;
00097 }
00098
00099 inline Mode::Mode(Slowness s, Polarisation p, int index)
00100 {
00101 TRACE;
00102 _polarisation=p;
00103 _slowness=s;
00104 _ringIndex=0;
00105 _index=index;
00106 }
00107
00108 inline Mode::Mode(const Mode& o) : XMLClass()
00109 {
00110 TRACE;
00111 _polarisation=o._polarisation;
00112 _slowness=o._slowness;
00113 _ringIndex=o._ringIndex;
00114 _index=o._index;
00115 }
00116
00117 inline bool Mode::operator==(const Mode& o) const
00118 {
00119 TRACE;
00120 return _polarisation==o._polarisation &&
00121 _slowness==o._slowness &&
00122 _ringIndex==o._ringIndex &&
00123 _index==o._index;
00124 }
00125
00126 }
00127
00128 #endif // MODE_H