denigma 4.0.0
Loading...
Searching...
No Matches
enigmaxml.h
1/*
2 * Copyright (C) 2026, Robert Patterson
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
17 * THE SOFTWARE.
18 */
19#pragma once
20
21#include "denigma/conversion.h"
22
23namespace denigma {
24
27namespace formats {
28
31namespace enigmaxml {
32
35struct Options final : public IOptions
36{
39};
40
44{
45public:
46 [[nodiscard]] FormatId sourceFormat() const override { return FormatId::Musx; }
47 [[nodiscard]] FormatId targetFormat() const override { return FormatId::EnigmaXml; }
48
51 std::ostream& output,
52 const Options& options = {}) const;
53
56 std::ostream& output,
57 const ConversionRequest& request = {}) const override;
58};
59
62
63} // namespace enigmaxml
64} // namespace formats
65} // namespace denigma
Result metadata returned after a conversion completes.
Definition conversion.h:109
Lightweight registry for locating converters by source and target format.
Definition conversion.h:241
Base class for adapter-specific option structs.
Definition conversion.h:93
Random-access byte reader used for container formats such as MUSX.
Definition random_access_reader.h:32
Public interface implemented by adapters whose input is a random-access container.
Definition conversion.h:184
Converter adapter for MUSX archive input to Enigma XML output.
Definition enigmaxml.h:44
FormatId sourceFormat() const override
Returns the source format accepted by this converter.
Definition enigmaxml.h:46
ConversionResult convert(const IRandomAccessReader &input, std::ostream &output, const Options &options={}) const
Extracts Enigma XML from a MUSX random-access reader and writes it to the provided stream.
FormatId targetFormat() const override
Returns the target format produced by this converter.
Definition enigmaxml.h:47
ConversionResult convert(const IRandomAccessReader &input, std::ostream &output, const ConversionRequest &request={}) const override
Extracts Enigma XML using type-erased registry options.
void registerConverters(ConverterRegistry &registry)
Registers all Enigma XML format converters with the supplied registry.
Core public API for the Denigma conversion libraries.
Definition articulations.h:32
FormatId
Stable identifiers for converter input and output formats.
Definition conversion.h:45
@ EnigmaXml
Finale Enigma XML.
@ Musx
Finale MUSX archive.
Options common to all public converter adapters.
Definition conversion.h:75
Type-erased request used by registry-based converter calls.
Definition conversion.h:101
Options for MUSX to Enigma XML conversion.
Definition enigmaxml.h:36
CommonOptions common
Options common to all converters.
Definition enigmaxml.h:38