From 44d8c4b76d3d37a2fff3deb63f5614e832c0b67e Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Mon, 9 May 2016 12:47:57 +0200
Subject: [PATCH] Namespace change: TINInterface to GeoLib::IO.

---
 Applications/Utils/FileConverter/TIN2VTK.cpp | 3 ++-
 Applications/Utils/FileConverter/VTK2TIN.cpp | 4 +++-
 GeoLib/IO/Legacy/OGSIOVer4.cpp               | 4 ++--
 GeoLib/IO/TINInterface.cpp                   | 6 ++++--
 GeoLib/IO/TINInterface.h                     | 6 +++---
 5 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/Applications/Utils/FileConverter/TIN2VTK.cpp b/Applications/Utils/FileConverter/TIN2VTK.cpp
index e63ed04f578..9106f78bc1d 100644
--- a/Applications/Utils/FileConverter/TIN2VTK.cpp
+++ b/Applications/Utils/FileConverter/TIN2VTK.cpp
@@ -59,7 +59,8 @@ int main (int argc, char* argv[])
 	auto pnt_vec = std::unique_ptr<std::vector<GeoLib::Point*>>(
 	    new std::vector<GeoLib::Point*>);
 	GeoLib::PointVec point_vec("SurfacePoints", std::move(pnt_vec));
-	std::unique_ptr<GeoLib::Surface> sfc(FileIO::TINInterface::readTIN(tinFileName, point_vec));
+	std::unique_ptr<GeoLib::Surface> sfc(
+	    GeoLib::IO::TINInterface::readTIN(tinFileName, point_vec));
 	if (!sfc)
 		return 1;
 	INFO("TIN read:  %d points, %d triangles", pnt_vec->size(), sfc->getNTriangles());
diff --git a/Applications/Utils/FileConverter/VTK2TIN.cpp b/Applications/Utils/FileConverter/VTK2TIN.cpp
index a766be69b28..e7166999910 100644
--- a/Applications/Utils/FileConverter/VTK2TIN.cpp
+++ b/Applications/Utils/FileConverter/VTK2TIN.cpp
@@ -61,7 +61,9 @@ int main (int argc, char* argv[])
 	GeoLib::GEOObjects geo_objects;
 	if (MeshLib::convertMeshToGeo(*mesh, geo_objects)) {
 		INFO("Writing TIN into the file");
-		FileIO::TINInterface::writeSurfaceAsTIN(*(*geo_objects.getSurfaceVec(mesh->getName()))[0], mesh_out.getValue());
+		GeoLib::IO::TINInterface::writeSurfaceAsTIN(
+		    *(*geo_objects.getSurfaceVec(mesh->getName()))[0],
+		    mesh_out.getValue());
 	}
 
 	delete custom_format;
diff --git a/GeoLib/IO/Legacy/OGSIOVer4.cpp b/GeoLib/IO/Legacy/OGSIOVer4.cpp
index cec74bfe929..bcdbbfb69d2 100644
--- a/GeoLib/IO/Legacy/OGSIOVer4.cpp
+++ b/GeoLib/IO/Legacy/OGSIOVer4.cpp
@@ -311,7 +311,7 @@ std::string readSurface(std::istream &in,
 		{
 			in >> line; // read value (file name)
 			line = path + line;
-			sfc = FileIO::TINInterface::readTIN(line, pnt_vec, &errors);
+			sfc = GeoLib::IO::TINInterface::readTIN(line, pnt_vec, &errors);
 		}
 		//....................................................................
 		if (line.find("$MAT_GROUP") != std::string::npos) // subkeyword found
@@ -541,7 +541,7 @@ std::size_t writeTINSurfaces(std::ofstream &os, GeoLib::SurfaceVec const* sfcs_v
 		os << "\t\t" << sfc_name << "\n";
 		// create tin file
 		sfc_name = path + sfc_name;
-		FileIO::TINInterface::writeSurfaceAsTIN(*(*sfcs)[k], sfc_name.c_str());
+		GeoLib::IO::TINInterface::writeSurfaceAsTIN(*(*sfcs)[k], sfc_name.c_str());
 		sfc_count++;
 	}
 	return sfc_count;
diff --git a/GeoLib/IO/TINInterface.cpp b/GeoLib/IO/TINInterface.cpp
index 9d93d0fcae7..e47f94d2964 100644
--- a/GeoLib/IO/TINInterface.cpp
+++ b/GeoLib/IO/TINInterface.cpp
@@ -20,7 +20,9 @@
 #include "GeoLib/Surface.h"
 #include "GeoLib/Triangle.h"
 
-namespace FileIO
+namespace GeoLib
+{
+namespace IO
 {
 
 GeoLib::Surface* TINInterface::readTIN(std::string const& fname,
@@ -139,5 +141,5 @@ void TINInterface::writeSurfaceAsTIN(GeoLib::Surface const& surface, std::string
 	}
 	os.close();
 }
-
+} // end namespace IO
 } // end namespace GeoLib
diff --git a/GeoLib/IO/TINInterface.h b/GeoLib/IO/TINInterface.h
index 41822205e13..a64d9740e66 100644
--- a/GeoLib/IO/TINInterface.h
+++ b/GeoLib/IO/TINInterface.h
@@ -18,9 +18,8 @@
 namespace GeoLib
 {
 class Surface;
-}
 
-namespace FileIO
+namespace IO
 {
 
 /**
@@ -48,6 +47,7 @@ public:
 	static void writeSurfaceAsTIN(GeoLib::Surface const& surface, std::string const& file_name);
 };
 
-}
+} // end namespace IO
+} // end namespace GeoLib
 
 #endif /* TININTERFACE_H_ */
-- 
GitLab