denigma 4.0.0
Loading...
Searching...
No Matches
denigma Namespace Reference

Core public API for the Denigma conversion libraries. More...

Namespaces

namespace  classify
 Music classification helpers for Finale symbol extraction.
 
namespace  formats
 Conversion adapters for Denigma output formats.
 

Classes

class  BufferRandomAccessReader
 Random-access reader backed by caller-owned memory. More...
 
struct  CommonOptions
 Options common to all public converter adapters. More...
 
class  ConversionArtifact
 Owned documents and result metadata from one conversion. More...
 
struct  ConversionOutput
 One document produced by a conversion. More...
 
struct  ConversionRequest
 Type-erased request used by registry-based converter calls. More...
 
struct  ConversionResult
 Result metadata returned after a conversion completes. More...
 
class  ConverterRegistry
 Lightweight registry for locating converters by source and target format. More...
 
struct  Diagnostic
 A non-fatal message emitted by a converter. More...
 
class  FileRandomAccessReader
 Random-access reader backed by a filesystem file. More...
 
struct  GapReportOptions
 What a gap report serialization needs beyond the gaps. More...
 
struct  GapReportProducer
 Identifies the software that serialized a gap report. More...
 
class  GapReportWriter
 Placeholder in builds without the serializer. More...
 
class  IConverter
 Public interface implemented by each conversion adapter. More...
 
class  IMultiOutputConverter
 Public interface implemented by adapters that may produce multiple output documents. More...
 
class  IOptions
 Base class for adapter-specific option structs. More...
 
class  IRandomAccessReader
 Random-access byte reader used for container formats such as MUSX. More...
 
class  IReaderConverter
 Public interface implemented by adapters whose input is a random-access container. More...
 
class  IReaderMultiOutputConverter
 Public interface implemented by reader-backed adapters that may produce multiple output documents. More...
 

Typedefs

using MultiOutputCallback = std::function< void(std::string_view suggestedName, std::span< const std::byte > data)>
 Callback used by converters that may emit zero, one, or many output buffers.
 
using GlyphMetricsFn = musx::util::SvgConvert::GlyphMetricsFn
 Measures text for the SVG images a report embeds: given a font and the glyphs to measure, returns their advance, ascent and descent in EVPU, or std::nullopt to fall back to heuristic metrics.
 

Enumerations

enum class  FormatId {
  Musx , EnigmaXml , MnxJson , MusicXml ,
  MssXml , Svg
}
 Stable identifiers for converter input and output formats. More...
 
enum class  MessageSeverity { Info , Warning , Error , Verbose }
 Severity for log messages and diagnostics emitted by converters.
 

Functions

template<typename OptionsT >
OptionsT optionsFromRequest (const ConversionRequest &request, std::string_view converterName)
 Returns typed options from an erased request, or default options when none were supplied.
 
template<typename Callback >
bool withGapReport (const classify::GapCollector &collector, Callback &&callback)
 Invokes a generic serialization callback synchronously, only in builds that include the gap report serializer.
 

Variables

constexpr bool GAP_REPORT_AVAILABLE = false
 

Detailed Description

Core public API for the Denigma conversion libraries.

Enumeration Type Documentation

◆ FormatId

enum class denigma::FormatId
strong

Stable identifiers for converter input and output formats.

Enumerator
Musx 

Finale MUSX archive.

EnigmaXml 

Finale Enigma XML.

MnxJson 

MNX JSON as produced by mnxdom.

MusicXml 

MusicXML score-partwise XML.

MssXml 

MuseScore style sheet XML.

Svg 

Scalable Vector Graphics XML.

Function Documentation

◆ optionsFromRequest()

template<typename OptionsT >
OptionsT denigma::optionsFromRequest ( const ConversionRequest request,
std::string_view  converterName 
)

Returns typed options from an erased request, or default options when none were supplied.

Returns
converion options typed as OptionsT.
Exceptions
std::invalid_argumentif the request contains incompatible options.

◆ withGapReport()

template<typename Callback >
bool denigma::withGapReport ( const classify::GapCollector collector,
Callback &&  callback 
)

Invokes a generic serialization callback synchronously, only in builds that include the gap report serializer.

The callback receives a #GapReportWriter for collector. Write it as a generic lambda whose body depends on the writer parameter, so that a build without the serializer never instantiates it and needs neither the serializer's symbols nor its headers.

Returns
True when the callback ran, false when this build has no gap report serializer.