/*
 * 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;
}
