Toward template rendering.

This commit is contained in:
jmsgrogan 2022-10-20 09:00:39 +01:00
parent eb3b394bdf
commit 350c20efa6
9 changed files with 542 additions and 385 deletions

View file

@ -76,7 +76,20 @@ FileFormat::Format File::InferFormat() const
void File::WriteText(const std::string& text)
{
bool had_to_open{ false };
if (!mOutHandle)
{
had_to_open = true;
SetAccessMode(File::AccessMode::Write);
Open();
}
(*mOutHandle) << text;
if (had_to_open)
{
Close();
}
}
std::vector<std::string> File::readLines()