Commit 7bacb929 authored by Praetorius, Simon's avatar Praetorius, Simon

cleanup of constructor and getters/setters in FileWriterInterface

parent 68c1eb6d
Pipeline #1819 passed with stage
in 29 minutes and 29 seconds
......@@ -16,11 +16,8 @@ namespace AMDiS
public:
explicit FileWriterInterface(std::string const& base)
{
filename_ = "solution";
Parameters::get(base + "->filename", filename_);
dir_ = "output";
Parameters::get(base + "->output directory", dir_);
name_ = "solution";
Parameters::get(base + "->name", name_);
}
......@@ -30,15 +27,16 @@ namespace AMDiS
// pure virtual method to be implemented by derived classes
virtual void writeFiles(AdaptInfo& adaptInfo, bool force) = 0;
public: // getter and setter
std::string filename() const
std::string const& filename() const
{
return filename_;
}
void setFilename(std::string const& filename)
std::string const& dir() const
{
filename_ = filename;
return dir_;
}
std::string const& name() const
......@@ -46,10 +44,25 @@ namespace AMDiS
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:
std::string filename_;
std::string dir_;
std::string name_;
std::string filename_ = "solution";
std::string dir_ = "output";
std::string name_ = "solution";
};
} // 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