Salome HOME
Dump Bathymetry data to python script (Feature #13).
[modules/hydro.git] / src / HYDROData / HYDROData_Tool.h
1
2 #ifndef HYDROData_Tool_HeaderFile
3 #define HYDROData_Tool_HeaderFile
4
5 #include <Precision.hxx>
6
7 #include <QString>
8
9 class QFile;
10 class QStringList;
11
12 class HYDROData_Tool {
13
14 public:
15
16   static void                           WriteStringsToFile( QFile&             theFile,
17                                                             const QStringList& theStrings,
18                                                             const QString&     theSep = "\n" );
19
20 };
21
22 inline bool ValuesEquals( const double& theFirst, const double& theSecond )
23 {
24   return theFirst > ( theSecond - Precision::Confusion() ) &&
25          theFirst < ( theSecond + Precision::Confusion() );
26 }
27
28 inline bool ValuesMoreEquals( const double& theFirst, const double& theSecond )
29 {
30   return theFirst >= theSecond || ValuesEquals( theFirst, theSecond );
31 }
32
33 inline  bool ValuesLessEquals( const double& theFirst, const double& theSecond )
34 {
35   return theFirst <= theSecond || ValuesEquals( theFirst, theSecond );
36 }
37
38
39
40
41 #endif
42
43