From 1ad983ec61f86ae01da666c3ebd9333ee12c3ac2 Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 23 Jun 2016 07:07:49 +0200
Subject: [PATCH] [FileIO] Namespace for Gmsh GeoLib::IO -> FileIO.

---
 Applications/DataExplorer/mainwindow.cpp             | 12 ++++++------
 Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp |  7 ++-----
 Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h   |  6 +++---
 Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp    |  7 ++-----
 Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h      |  7 ++-----
 Applications/FileIO/Gmsh/GMSHInterface.cpp           |  8 ++++----
 Applications/FileIO/Gmsh/GMSHInterface.h             |  9 ++++-----
 Applications/FileIO/Gmsh/GMSHLine.cpp                |  7 ++-----
 Applications/FileIO/Gmsh/GMSHLine.h                  |  7 ++-----
 Applications/FileIO/Gmsh/GMSHLineLoop.cpp            |  7 ++-----
 Applications/FileIO/Gmsh/GMSHLineLoop.h              |  7 ++-----
 Applications/FileIO/Gmsh/GMSHMeshDensityStrategy.h   |  7 ++++---
 Applications/FileIO/Gmsh/GMSHPoint.cpp               |  7 ++-----
 Applications/FileIO/Gmsh/GMSHPoint.h                 |  7 ++-----
 Applications/FileIO/Gmsh/GMSHPolygonTree.cpp         |  7 ++-----
 Applications/FileIO/Gmsh/GMSHPolygonTree.h           |  6 +++---
 16 files changed, 44 insertions(+), 74 deletions(-)

diff --git a/Applications/DataExplorer/mainwindow.cpp b/Applications/DataExplorer/mainwindow.cpp
index b90f14bfbdf..e183a2f3851 100644
--- a/Applications/DataExplorer/mainwindow.cpp
+++ b/Applications/DataExplorer/mainwindow.cpp
@@ -427,9 +427,9 @@ void MainWindow::save()
         std::vector<std::string> selected_geometries;
         _project.getGEOObjects().getGeometryNames(selected_geometries);
 
-        GeoLib::IO::GMSHInterface gmsh_io(
+        FileIO::GMSH::GMSHInterface gmsh_io(
             _project.getGEOObjects(), true,
-            GeoLib::IO::GMSH::MeshDensityAlgorithm::AdaptiveMeshDensity, 0.05,
+            FileIO::GMSH::MeshDensityAlgorithm::AdaptiveMeshDensity, 0.05,
             0.5, 2, selected_geometries);
         gmsh_io.setPrecision(std::numeric_limits<double>::digits10);
         bool const success = gmsh_io.writeToFile(fileName.toStdString());
@@ -904,16 +904,16 @@ void MainWindow::callGMSH(std::vector<std::string> & selectedGeometries,
         if (!fileName.isEmpty())
         {
             if (param4 == -1) { // adaptive meshing selected
-                GeoLib::IO::GMSHInterface gmsh_io(
+                FileIO::GMSH::GMSHInterface gmsh_io(
                     _project.getGEOObjects(), true,
-                    GeoLib::IO::GMSH::MeshDensityAlgorithm::AdaptiveMeshDensity,
+                    FileIO::GMSH::MeshDensityAlgorithm::AdaptiveMeshDensity,
                     param2, param3, param1, selectedGeometries);
                 gmsh_io.setPrecision(std::numeric_limits<double>::digits10);
                 gmsh_io.writeToFile(fileName.toStdString());
             } else { // homogeneous meshing selected
-                GeoLib::IO::GMSHInterface gmsh_io(
+                FileIO::GMSH::GMSHInterface gmsh_io(
                     _project.getGEOObjects(), true,
-                    GeoLib::IO::GMSH::MeshDensityAlgorithm::FixedMeshDensity,
+                    FileIO::GMSH::MeshDensityAlgorithm::FixedMeshDensity,
                     param4, param3, param1, selectedGeometries);
                 gmsh_io.setPrecision(std::numeric_limits<double>::digits10);
                 gmsh_io.writeToFile(fileName.toStdString());
diff --git a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp
index d58ec7f2a3d..23bd821371c 100644
--- a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp
+++ b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.cpp
@@ -26,9 +26,7 @@
 
 #include "MathLib/MathTools.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -159,5 +157,4 @@ void GMSHAdaptiveMeshDensity::getQuadTreeGeometry(std::vector<GeoLib::Point*> &p
 #endif
 }
 
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h
index cb08be347d3..a33be778e8e 100644
--- a/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h
+++ b/Applications/FileIO/Gmsh/GMSHAdaptiveMeshDensity.h
@@ -21,8 +21,9 @@ template <typename T> class QuadTree;
 #ifndef NDEBUG
 class Polyline;
 #endif
+}
 
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -53,7 +54,6 @@ private:
 };
 
 }
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace FileIO
 
 #endif /* GMSHADAPTIVEMESHDENSITY_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp
index 3147260bc69..4688776ba00 100644
--- a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp
+++ b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.cpp
@@ -10,9 +10,7 @@
 
 #include "GMSHFixedMeshDensity.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -39,5 +37,4 @@ double GMSHFixedMeshDensity::getMeshDensityAtStation(GeoLib::Point const*const)
 }
 
 }
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h
index ad97c9d190d..c42410e86b8 100644
--- a/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h
+++ b/Applications/FileIO/Gmsh/GMSHFixedMeshDensity.h
@@ -13,9 +13,7 @@
 
 #include "GMSHMeshDensityStrategy.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -34,7 +32,6 @@ private:
 };
 
 }
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace FileIO
 
 #endif /* GMSHFIXEDMESHDENSITY_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHInterface.cpp b/Applications/FileIO/Gmsh/GMSHInterface.cpp
index 0e209db06b2..a0a148e1d36 100644
--- a/Applications/FileIO/Gmsh/GMSHInterface.cpp
+++ b/Applications/FileIO/Gmsh/GMSHInterface.cpp
@@ -29,9 +29,9 @@
 #include "GeoLib/PolylineWithSegmentMarker.h"
 #include "GeoLib/PolygonWithSegmentMarker.h"
 
-namespace GeoLib
+namespace FileIO
 {
-namespace IO
+namespace GMSH
 {
 GMSHInterface::GMSHInterface(GeoLib::GEOObjects& geo_objs,
                              bool /*include_stations_as_constraints*/,
@@ -246,5 +246,5 @@ void GMSHInterface::writePoints(std::ostream& out) const
     }
 }
 
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace GMSH
+} // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHInterface.h b/Applications/FileIO/Gmsh/GMSHInterface.h
index 2159b74338e..965e898c557 100644
--- a/Applications/FileIO/Gmsh/GMSHInterface.h
+++ b/Applications/FileIO/Gmsh/GMSHInterface.h
@@ -21,8 +21,9 @@ namespace GeoLib
 {
 class GEOObjects;
 class Polygon;
+}
 
-namespace IO
+namespace FileIO
 {
 
 namespace GMSH
@@ -37,8 +38,6 @@ enum class MeshDensityAlgorithm {
     AdaptiveMeshDensity //!< computing the mesh density employing a QuadTree
 };
 
-}
-
 /**
  * \brief Reads and writes GMSH-files to and from OGS data structures.
  */
@@ -115,7 +114,7 @@ private:
     bool _rotate = false;
     bool _keep_preprocessed_geometry = true;
 };
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace GMSH
+} // end namespace FileIO
 
 #endif /* GMSHINTERFACE_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHLine.cpp b/Applications/FileIO/Gmsh/GMSHLine.cpp
index d3fda7cb580..f58c1834341 100644
--- a/Applications/FileIO/Gmsh/GMSHLine.cpp
+++ b/Applications/FileIO/Gmsh/GMSHLine.cpp
@@ -11,9 +11,7 @@
 #include <ostream>
 #include "GMSHLine.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -34,5 +32,4 @@ void GMSHLine::resetLineData(std::size_t start_point_id, std::size_t end_point_i
 }
 
 } // end namespace GMSH
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHLine.h b/Applications/FileIO/Gmsh/GMSHLine.h
index d67bfcbcb71..5457c2ece7e 100644
--- a/Applications/FileIO/Gmsh/GMSHLine.h
+++ b/Applications/FileIO/Gmsh/GMSHLine.h
@@ -13,9 +13,7 @@
 
 #include <iosfwd>
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -32,7 +30,6 @@ private:
 };
 
 } // end namespace GMSH
-} // end namespace IO
-} // end namespace GeoLib
+} // end namespace FileIO
 
 #endif /* GMSHLINE_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHLineLoop.cpp b/Applications/FileIO/Gmsh/GMSHLineLoop.cpp
index 7874006c36d..ef98e14a151 100644
--- a/Applications/FileIO/Gmsh/GMSHLineLoop.cpp
+++ b/Applications/FileIO/Gmsh/GMSHLineLoop.cpp
@@ -13,9 +13,7 @@
 #include "GMSHLine.h"
 #include "GMSHLineLoop.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -56,5 +54,4 @@ void GMSHLineLoop::write(std::ostream &os, std::size_t line_offset, std::size_t
 }
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHLineLoop.h b/Applications/FileIO/Gmsh/GMSHLineLoop.h
index bba65e7b2f4..c572d3a65a0 100644
--- a/Applications/FileIO/Gmsh/GMSHLineLoop.h
+++ b/Applications/FileIO/Gmsh/GMSHLineLoop.h
@@ -14,9 +14,7 @@
 #include <vector>
 #include <iosfwd>
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -38,7 +36,6 @@ private:
 };
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
 
 #endif /* GMSHLINELOOP_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHMeshDensityStrategy.h b/Applications/FileIO/Gmsh/GMSHMeshDensityStrategy.h
index cbd7c1ff5a4..77529f3895e 100644
--- a/Applications/FileIO/Gmsh/GMSHMeshDensityStrategy.h
+++ b/Applications/FileIO/Gmsh/GMSHMeshDensityStrategy.h
@@ -16,7 +16,9 @@
 namespace GeoLib
 {
 class Point;
-namespace IO
+}
+
+namespace FileIO
 {
 namespace GMSH
 {
@@ -34,7 +36,6 @@ public:
 };
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
 
 #endif /* GMSHMESHDENSITYSTRATEGY_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHPoint.cpp b/Applications/FileIO/Gmsh/GMSHPoint.cpp
index 3e5da53c8a2..bf1cb7d1212 100644
--- a/Applications/FileIO/Gmsh/GMSHPoint.cpp
+++ b/Applications/FileIO/Gmsh/GMSHPoint.cpp
@@ -13,9 +13,7 @@
 
 #include "GMSHPoint.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -41,5 +39,4 @@ std::ostream& operator<< (std::ostream &os, GMSHPoint const& p)
 }
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHPoint.h b/Applications/FileIO/Gmsh/GMSHPoint.h
index 41310a4ba91..be34f5911d3 100644
--- a/Applications/FileIO/Gmsh/GMSHPoint.h
+++ b/Applications/FileIO/Gmsh/GMSHPoint.h
@@ -14,9 +14,7 @@
 // GeoLib
 #include "GeoLib/Point.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -33,7 +31,6 @@ private:
 std::ostream& operator<< (std::ostream &os, GMSHPoint const& p);
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
 
 #endif /* GMSHPOINT_H_ */
diff --git a/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp b/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp
index 87a2edb041c..a9ecd83f591 100644
--- a/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp
+++ b/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp
@@ -20,9 +20,7 @@
 #include "GeoLib/PolylineWithSegmentMarker.h"
 #include "GeoLib/PolygonWithSegmentMarker.h"
 
-namespace GeoLib
-{
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -423,5 +421,4 @@ void GMSHPolygonTree::getStationsInsideSubPolygons(std::vector<GeoLib::Point con
 }
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
diff --git a/Applications/FileIO/Gmsh/GMSHPolygonTree.h b/Applications/FileIO/Gmsh/GMSHPolygonTree.h
index 8b42c0bd134..5dfbc24878d 100644
--- a/Applications/FileIO/Gmsh/GMSHPolygonTree.h
+++ b/Applications/FileIO/Gmsh/GMSHPolygonTree.h
@@ -26,8 +26,9 @@ class GEOObjects;
 class Polygon;
 class PolylineWithSegmentMarker;
 class PolygonWithSegmentMarker;
+}
 
-namespace IO
+namespace FileIO
 {
 namespace GMSH
 {
@@ -100,7 +101,6 @@ private:
 };
 
 }  // end namespace GMSH
-}  // end namespace IO
-}  // end namespace GeoLib
+}  // end namespace FileIO
 
 #endif /* GMSHPOLYGONTREE_H_ */
-- 
GitLab