28#include "denigma/classify/chords.h"
29#include "denigma/classify/expressions.h"
30#include "denigma/classify/formatted_text.h"
31#include "denigma/classify/lyrics.h"
32#include "denigma/classify/noteheads.h"
33#include "denigma/classify/smartshapes.h"
43 std::optional<int> staff;
89 std::optional<GapAnchor>
end;
106 void retainDocument(musx::dom::DocumentPtr document) { m_documents.push_back(std::move(document)); }
109 template <
typename Payload>
112 m_gaps.push_back({std::move(anchor), std::nullopt, extent, std::move(placements), GapPayload(std::move(payload))});
116 template <
typename Payload>
119 m_gaps.push_back({std::move(anchor), std::move(end), extent, {}, GapPayload(std::move(payload))});
123 [[nodiscard]] std::span<const Gap>
gaps() const noexcept {
return m_gaps; }
126 std::vector<Gap> m_gaps;
127 std::vector<musx::dom::DocumentPtr> m_documents;
Collects typed conversion gaps for inspection or later serialization.
Definition gaps.h:103
std::span< const Gap > gaps() const noexcept
Returns collected gaps in source traversal order.
Definition gaps.h:123
void add(GapAnchor anchor, Payload payload, GapExtent extent=GapExtent::Complete, std::vector< GapPlacement > placements={})
Adds one typed gap.
Definition gaps.h:110
void addSpan(GapAnchor anchor, GapAnchor end, Payload payload, GapExtent extent=GapExtent::Complete)
Adds one typed gap for a feature that spans from anchor to end.
Definition gaps.h:117
void retainDocument(musx::dom::DocumentPtr document)
Keeps document alive for the collector's lifetime.
Definition gaps.h:106
GapExtent
How much of the feature the conversion target lacks.
Definition gaps.h:50
@ Partial
The anchored object stands for the feature but lost the reported payload.
@ Complete
Nothing in the target stands for the feature.
Core public API for the Denigma conversion libraries.
Definition articulations.h:33
Target-neutral musical and display semantics of a Finale chord assignment.
Definition chords.h:151
Exporter-neutral semantic classification of one Finale expression.
Definition expressions.h:338
Document-independent classification of a formatted Enigma text.
Definition formatted_text.h:91
Stable target object identity and optional location within that object.
Definition gaps.h:41
std::optional< musx::util::Fraction > position
Position within the anchored measure as a fraction of a whole note.
Definition gaps.h:45
One place the target document would draw a feature that is reported once.
Definition gaps.h:61
Kind
What the placement's anchor names.
Definition gaps.h:64
@ SystemBottom
The bottom staff of every system: the anchor is the global measure.
@ SystemTop
The top staff of every system: the anchor is the global measure.
@ Staff
A staff of a part measure: the anchor is the part measure with a staff.
One classified feature omitted, in whole or in part, from a conversion target.
Definition gaps.h:86
std::vector< GapPlacement > placements
Where the target would draw the feature. Empty when anchor alone says so.
Definition gaps.h:92
std::optional< GapAnchor > end
Where a spanning feature ends. Empty for a feature that occupies one place.
Definition gaps.h:89
Result returned by lyric word-extension classification.
Definition lyrics.h:45
Result returned by notehead classification.
Definition noteheads.h:65
Marker payload: the anchored object sounds in the source without being drawn, and the target cannot h...
Definition gaps.h:78
Result returned by smart-shape classification.
Definition smartshapes.h:197