ORE Studio 0.0.4
Loading...
Searching...
No Matches
importer.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2025 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 * MA 02110-1301, USA.
19 *
20 */
21#ifndef ORES_ORE_XML_IMPORTER_HPP
22#define ORES_ORE_XML_IMPORTER_HPP
23
24#include <vector>
25#include <filesystem>
26#include "ores.logging/make_logger.hpp"
27#include "ores.refdata/domain/currency.hpp"
28
29namespace ores::ore::xml {
30
34class importer {
35private:
36 inline static std::string_view logger_name = "ores.ore.xml.importer";
37
38 static auto& lg() {
39 using namespace ores::logging;
40 static auto instance = make_logger(logger_name);
41 return instance;
42 }
43
44public:
54 static std::string validate_currency(const refdata::domain::currency& currency);
55
56 static std::vector<refdata::domain::currency>
57 import_currency_config(const std::filesystem::path& path);
58};
59
60}
61
62#endif
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Provides XML serialisation support for ORE types.
Definition exporter.hpp:28
Imports domain objects from their ORE XML representation.
Definition importer.hpp:34
static std::string validate_currency(const refdata::domain::currency &currency)
Validates a currency against XSD schema requirements.
Definition importer.cpp:33
Represents a currency with its metadata and formatting rules.
Definition currency.hpp:33