Skip to content
Snippets Groups Projects
Commit 2e502f29 authored by Tom Fischer's avatar Tom Fischer
Browse files

Move Writer from FileIO to BaseLib/IO.

parent 54b3799f
No related branches found
No related tags found
No related merge requests found
GET_SOURCE_FILES(SOURCES) GET_SOURCE_FILES(SOURCES)
GET_SOURCE_FILES(SOURCES_IO IO)
set(SOURCES ${SOURCES} ${SOURCES_IO})
list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h) list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h)
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
#include <fstream> #include <fstream>
#include <limits> #include <limits>
namespace FileIO namespace BaseLib
{
namespace IO
{ {
Writer::Writer() Writer::Writer()
...@@ -72,4 +74,5 @@ void Writer::setFormat(std::ios_base::fmtflags flags) ...@@ -72,4 +74,5 @@ void Writer::setFormat(std::ios_base::fmtflags flags)
_out.setf(flags); _out.setf(flags);
} }
} // namespace FileIO } // namespace IO
} // namespace BaseLib
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
namespace FileIO namespace BaseLib
{
namespace IO
{ {
/// @brief Base class which enables writing an object to string, stringstream /// @brief Base class which enables writing an object to string, stringstream
...@@ -58,6 +60,7 @@ private: ...@@ -58,6 +60,7 @@ private:
}; };
} // namespace FileIO } // namespace IO
} // namespace BaseLib
#endif // WRITER_H #endif // WRITER_H
...@@ -19,8 +19,6 @@ set(SOURCES ...@@ -19,8 +19,6 @@ set(SOURCES
TetGenInterface.cpp TetGenInterface.cpp
TINInterface.h TINInterface.h
TINInterface.cpp TINInterface.cpp
Writer.h
Writer.cpp
writeMeshToFile.h writeMeshToFile.h
writeMeshToFile.cpp writeMeshToFile.cpp
) )
......
...@@ -19,11 +19,10 @@ ...@@ -19,11 +19,10 @@
#include <map> #include <map>
#include <string> #include <string>
// FileIO #include "BaseLib/IO/Writer.h"
#include "Writer.h" #include "FileIO/GmshIO/GMSHPoint.h"
#include "GmshIO/GMSHPoint.h" #include "FileIO/GmshIO/GMSHPolygonTree.h"
#include "GmshIO/GMSHPolygonTree.h" #include "FileIO/GmshIO/GMSHMeshDensityStrategy.h"
#include "GmshIO/GMSHMeshDensityStrategy.h"
#include "MathLib/LinAlg/Dense/DenseMatrix.h" #include "MathLib/LinAlg/Dense/DenseMatrix.h"
...@@ -55,7 +54,7 @@ enum class MeshDensityAlgorithm { ...@@ -55,7 +54,7 @@ enum class MeshDensityAlgorithm {
/** /**
* \brief Reads and writes GMSH-files to and from OGS data structures. * \brief Reads and writes GMSH-files to and from OGS data structures.
*/ */
class GMSHInterface : public Writer class GMSHInterface : public BaseLib::IO::Writer
{ {
public: public:
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <vector> #include <vector>
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include "FileIO/Writer.h" #include "BaseLib/IO/Writer.h"
#include "MeshLib/MeshEnums.h" #include "MeshLib/MeshEnums.h"
#include "MeshLib/PropertyVector.h" #include "MeshLib/PropertyVector.h"
...@@ -39,7 +39,7 @@ namespace FileIO ...@@ -39,7 +39,7 @@ namespace FileIO
namespace Legacy { namespace Legacy {
/// Interface for handling mesh files from OGS-5 and below. (*.msh files) /// Interface for handling mesh files from OGS-5 and below. (*.msh files)
class MeshIO : public Writer class MeshIO : public BaseLib::IO::Writer
{ {
public: public:
/// Constructor. /// Constructor.
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
#include "BaseLib/FileTools.h" #include "BaseLib/FileTools.h"
#include "BaseLib/FileFinder.h" #include "BaseLib/FileFinder.h"
#include "BaseLib/IO/Writer.h"
#include "FileIO/Writer.h"
#include "FileIO/Legacy/MeshIO.h" #include "FileIO/Legacy/MeshIO.h"
#include "FileIO/readMeshFromFile.h" #include "FileIO/readMeshFromFile.h"
#include "MeshLib/Mesh.h" #include "MeshLib/Mesh.h"
...@@ -109,7 +109,7 @@ int XmlGspInterface::readFile(const QString &fileName) ...@@ -109,7 +109,7 @@ int XmlGspInterface::readFile(const QString &fileName)
int XmlGspInterface::writeToFile(const std::string& filename) int XmlGspInterface::writeToFile(const std::string& filename)
{ {
_filename = filename; _filename = filename;
return FileIO::Writer::writeToFile(filename); return BaseLib::IO::Writer::writeToFile(filename);
} }
bool XmlGspInterface::write() bool XmlGspInterface::write()
......
...@@ -17,14 +17,14 @@ ...@@ -17,14 +17,14 @@
#include <string> #include <string>
#include "FileIO/Writer.h" #include "BaseLib/IO/Writer.h"
namespace FileIO namespace FileIO
{ {
/** /**
* \brief Base class for writing any information to and from XML files. * \brief Base class for writing any information to and from XML files.
*/ */
class XMLInterface : public Writer class XMLInterface : public BaseLib::IO::Writer
{ {
public: public:
XMLInterface(); XMLInterface();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment