diff --git a/src/OpenVolumeMesh/FileManager/FileManager.hh b/src/OpenVolumeMesh/FileManager/FileManager.hh index 3519626b8377847b88f6ba2017083b9553e6630e..8f712d9cb875b6c2eada9ce020f22e8268406d2c 100644 --- a/src/OpenVolumeMesh/FileManager/FileManager.hh +++ b/src/OpenVolumeMesh/FileManager/FileManager.hh @@ -43,14 +43,58 @@ #ifndef FILEMANAGER_HH_ #define FILEMANAGER_HH_ +#include + namespace OpenVolumeMesh { namespace IO { +/** + * \class FileManager + * \brief Read/Write mesh data from/to files + */ + +template +class FileManager { +public: + + /// Default constructor + FileManager(); + /// Default destructor + ~FileManager(); + + /** + * \brief Read a mesh from a file + * + * Returns true if the file was successfully read. The mesh + * is stored in parameter _mesh. If something goes wrong, + * this function returns false. + * + * @param _filename The file that is to be read + * @param _mesh A reference to an OpenVolumeMesh instance + */ + bool readFile(const std::string& _filename, MeshT& _mesh) const; + + /** + * \brief Write a mesh to a file + * + * Returns true if the file was successfully written. The mesh + * is passed as parameter _mesh. If something goes wrong, + * this function returns false. + * + * @param _filename The file that is to be stored + * @param _mesh A const reference to an OpenVolumeMesh instance + */ + bool writeFile(const std::string& _filename, const MeshT& _mesh) const; +}; } // Namespace IO } // Namespace FileManager +#if defined(INCLUDE_TEMPLATES) && !defined(FILEMANAGERT_CC) +#include "FileManagerT.cc" +#endif + #endif /* FILEMANAGER_HH_ */ diff --git a/src/OpenVolumeMesh/FileManager/FileManager.cc b/src/OpenVolumeMesh/FileManager/FileManagerT.cc similarity index 86% rename from src/OpenVolumeMesh/FileManager/FileManager.cc rename to src/OpenVolumeMesh/FileManager/FileManagerT.cc index a3acfa6258d6377b2273320b7df1c00722920b4c..ab6175e8a116c0f3c678e3e998981f2e7545a72f 100644 --- a/src/OpenVolumeMesh/FileManager/FileManager.cc +++ b/src/OpenVolumeMesh/FileManager/FileManagerT.cc @@ -40,13 +40,39 @@ * * \*===========================================================================*/ +#define FILEMANAGERT_CC + #include "FileManager.hh" namespace OpenVolumeMesh { namespace IO { +//================================================== + +FileManager::FileManager() { + +} + +//================================================== + +FileManager::~FileManager() { + +} + +//================================================== + +template +bool FileManager::readFile(const std::string& _filename, MeshT& _mesh) { + +} + +//================================================== + +template +bool FileManager::writeFile(const std::string& _filename, const MeshT& _mesh) { +} } // Namespace IO