21#ifndef ORES_ORE_XML_EXPORTER_HPP
22#define ORES_ORE_XML_EXPORTER_HPP
27#include "ores.logging/make_logger.hpp"
28#include "ores.refdata.api/domain/currency.hpp"
29#include "ores.refdata.api/domain/calendar_adjustment.hpp"
30#include "ores.trading.api/messaging/trade_protocol.hpp"
31#include "ores.ore/domain/conventions_mapper.hpp"
35struct roundtrip_summary {
36 int total_xml_files = 0;
38 int output_files_written = 0;
39 int trades_mapped = 0;
40 int trades_passthrough = 0;
41 int currency_files = 0;
42 int calendar_files = 0;
43 int convention_files = 0;
44 long long import_ms = 0;
45 long long export_ms = 0;
46 long long total_ms = 0;
54 inline static std::string_view logger_name =
"ores.ore.xml.exporter";
58 static auto instance = make_logger(logger_name);
64 export_currency_config(
const std::vector<refdata::domain::currency>& v);
66 static std::string export_calendar_adjustments(
67 const std::vector<refdata::domain::calendar_adjustment>& v);
69 static std::string export_conventions(
80 const std::vector<trading::messaging::trade_export_item>& items);
90 const std::filesystem::path& input_dir,
91 const std::filesystem::path& output_dir);
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Provides XML serialisation support for ORE types.
Definition exporter.hpp:33
All convention types extracted from a single ORE conventions.xml file.
Definition conventions_mapper.hpp:46
Exports domain objects to their ORE XML representation.
Definition exporter.hpp:52
static roundtrip_summary roundtrip(const std::filesystem::path &input_dir, const std::filesystem::path &output_dir)
Walks input_dir recursively, roundtrips every supported ORE XML through the import→export pipeline,...
Definition exporter.cpp:406
static std::string export_portfolio(const std::vector< trading::messaging::trade_export_item > &items)
Reconstructs an ORE portfolio XML from a vector of (trade, instrument) pairs returned by export_portf...
Definition exporter.cpp:102