define the base class to define different file formats

This commit is contained in:
Sven Czarnian committed 2021-08-10 08:40:53 +02:00
1 parent 5543d28bbf
commit 163786698c
3 files changed
+99

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
/*
* Author:
* Sven Czarnian <devel@svcz.de>
* Brief:
* Implements the generic file format
* Copyright:
* 2021 Sven Czarnian
* License:
* GNU General Public License v3 (GPLv3)
*/
#include <limits>
#include <aman/config/FileFormat.h>
using namespace aman;
FileFormat::FileFormat() noexcept :
m_errorLine(std::numeric_limits<std::uint32_t>::max()),
m_errorMessage() { }
void FileFormat::reset() noexcept {
this->m_errorLine = std::numeric_limits<std::uint32_t>::max();
this->m_errorMessage.clear();
}
bool FileFormat::errorFound() const noexcept {
return std::numeric_limits<std::uint32_t>::max() != this->m_errorLine;
}
std::uint32_t FileFormat::errorLine() const noexcept {
return this->m_errorLine;
}
const std::string& FileFormat::errorMessage() const noexcept {
return this->m_errorMessage;
}