Commit dbb8741e authored by Praetorius, Simon's avatar Praetorius, Simon

Merge branch 'issue/filewriterinterface_cleanup' into 'develop'

cleanup of constructor and getters/setters in FileWriterInterface

See merge request spraetor/dune-amdis!100
parents 6dce5bfe 7bacb929
Pipeline #1824 canceled with stage
...@@ -16,11 +16,8 @@ namespace AMDiS ...@@ -16,11 +16,8 @@ namespace AMDiS
public: public:
explicit FileWriterInterface(std::string const& base) explicit FileWriterInterface(std::string const& base)
{ {
filename_ = "solution";
Parameters::get(base + "->filename", filename_); Parameters::get(base + "->filename", filename_);
dir_ = "output";
Parameters::get(base + "->output directory", dir_); Parameters::get(base + "->output directory", dir_);
name_ = "solution";
Parameters::get(base + "->name", name_); Parameters::get(base + "->name", name_);
} }
...@@ -30,15 +27,16 @@ namespace AMDiS ...@@ -30,15 +27,16 @@ namespace AMDiS
// pure virtual method to be implemented by derived classes // pure virtual method to be implemented by derived classes
virtual void writeFiles(AdaptInfo& adaptInfo, bool force) = 0; virtual void writeFiles(AdaptInfo& adaptInfo, bool force) = 0;
public: // getter and setter
std::string filename() const std::string const& filename() const
{ {
return filename_; return filename_;
} }
void setFilename(std::string const& filename) std::string const& dir() const
{ {
filename_ = filename; return dir_;
} }
std::string const& name() const std::string const& name() const
...@@ -46,10 +44,25 @@ namespace AMDiS ...@@ -46,10 +44,25 @@ namespace AMDiS
return name_; return name_;
} }
void setFilename(std::string const& filename)
{
filename_ = filename;
}
void setDir(std::string const& dir)
{
dir_ = dir;
}
void setName(std::string const& name)
{
name_ = name;
}
protected: protected:
std::string filename_; std::string filename_ = "solution";
std::string dir_; std::string dir_ = "output";
std::string name_; std::string name_ = "solution";
}; };
} // end namespace AMDiS } // end namespace AMDiS
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment