MUSX Document Model
Loading...
Searching...
No Matches
ConstructionContext.h
1#pragma once
2
3#include <set>
4
5#include "musx/dom/DocumentElement.h"
6
7namespace musx {
8namespace factory {
9
12{
13public:
16 {
17 if (fontId != 0) {
18 m_referencedFontIds.insert(fontId);
19 }
20 }
21
22private:
23 friend void resolveFontDefinitions(const dom::DocumentPtr&, const ConstructionContext&);
24
26 [[nodiscard]] const std::set<dom::Cmper>& referencedFontIds() const { return m_referencedFontIds; }
27 [[nodiscard]] std::set<dom::Cmper>& referencedFontIds() { return m_referencedFontIds; }
28
29 std::set<dom::Cmper> m_referencedFontIds;
30};
31
32} // namespace factory
33} // namespace musx
State shared by all factories during one document construction.
Definition ConstructionContext.h:12
void registerFontId(dom::Cmper fontId)
Records a non-default font definition ID referenced during construction.
Definition ConstructionContext.h:15
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:57
std::shared_ptr< Document > DocumentPtr
Shared Document pointer.
Definition DocumentElement.h:35
object model for musx file (enigmaxml)
Definition BaseClasses.h:39