8 #ifndef __VRV_IOMEI_H__
9 #define __VRV_IOMEI_H__
21 #include "pugixml.hpp"
28 class AltSymInterface;
32 class AreaPosInterface;
57 class DurationInterface;
67 class FloatingElement;
69 class GenericLayerElement;
79 class LinkingInterface;
114 class PageMilestoneEnd;
121 class PitchInflection;
122 class PitchInterface;
124 class PlistInterface;
125 class PositionInterface;
136 class RunningElement;
139 class ScoreDefElement;
140 class ScoreDefInterface;
159 class SystemMilestoneEnd;
164 class TextDirInterface;
166 class TextLayoutElement;
168 class TimePointInterface;
169 class TimeSpanningInterface;
180 enum class MatchLocation { Before, Here, After };
181 enum class RangeMatchLocation { BeforeStart, AtStart, BetweenStartEnd, AtEnd, AfterEnd };
222 void SetScoreBasedMEI(
bool scoreBasedMEI) { m_scoreBasedMEI = scoreBasedMEI; }
224 bool GetScoreBasedMEI()
const {
return m_scoreBasedMEI; }
230 void SetBasic(
bool basic) { m_basic = basic; }
232 bool GetBasic()
const {
return m_basic; }
240 void SetFirstPage(
int page);
241 void SetLastPage(
int page);
242 void SetFirstMeasure(
const std::string &
id);
243 void SetLastMeasure(
const std::string &
id);
244 void SetMdiv(
const std::string &
id);
251 bool IsScoreBasedMEI()
const {
return m_scoreBasedMEI; }
253 bool IsPageBasedMEI()
const {
return !m_scoreBasedMEI; }
282 bool IsTreeObject(
Object *
object)
const;
287 bool HasValidFilter()
const;
289 bool IsMatchingFilter()
const;
290 void UpdateFilter(
Object *
object);
291 void UpdatePageFilter(
Object *
object);
292 void UpdateMeasureFilter(
Object *
object);
293 void UpdateMdivFilter(
Object *
object);
294 bool ProcessScoreBasedFilter(
Object *
object);
295 bool ProcessScoreBasedFilterEnd(
Object *
object);
296 void PruneAttributes(pugi::xml_node node);
302 bool WriteObjectInternal(
Object *
object,
bool useCustomScoreDef);
304 bool WriteObjectInternalEnd(
Object *
object);
305 void WriteStackedObjects();
306 void WriteStackedObjectsEnd();
312 void WriteCustomScoreDef(
ScoreDef *scoreDef);
315 bool AdjustLabel(
Label *label);
321 bool WriteDoc(
Doc *doc);
326 void WriteRevisionDesc(pugi::xml_node meiHead);
331 void WriteXmlId(pugi::xml_node currentNode,
Object *
object);
336 void WriteMdiv(pugi::xml_node currentNode,
Mdiv *mdiv);
338 void WritePages(pugi::xml_node currentNode,
Pages *pages);
339 void WriteScore(pugi::xml_node currentNode,
Score *score);
345 void WriteSection(pugi::xml_node currentNode,
Section *section);
347 void WriteEnding(pugi::xml_node currentNote,
Ending *ending);
348 void WriteExpansion(pugi::xml_node currentNote,
Expansion *expansion);
349 void WritePb(pugi::xml_node currentNode,
Pb *pb);
350 void WriteSb(pugi::xml_node currentNode,
Sb *sb);
356 void WritePage(pugi::xml_node currentNode,
Page *page);
358 void WritePageElement(pugi::xml_node element,
PageElement *
object);
359 void WritePageMilestoneEnd(pugi::xml_node currentNode,
PageMilestoneEnd *milestoneEnd);
360 void WriteSystem(pugi::xml_node currentNode,
System *system);
361 void WriteSystemMilestoneEnd(pugi::xml_node currentNode,
SystemMilestoneEnd *milestoneEnd);
362 void WriteScoreDef(pugi::xml_node currentNode,
ScoreDef *scoreDef);
363 void WriteGrpSym(pugi::xml_node currentNode,
GrpSym *grmSym);
364 void WritePgFoot(pugi::xml_node currentNode,
PgFoot *pgFoot);
365 void WritePgHead(pugi::xml_node currentNode,
PgHead *pgHead);
366 void WriteDiv(pugi::xml_node currentNode,
Div *div);
367 void WriteStaffGrp(pugi::xml_node currentNode,
StaffGrp *staffGrp);
368 void WriteStaffDef(pugi::xml_node currentNode,
StaffDef *staffDef);
369 void WriteInstrDef(pugi::xml_node currentNode,
InstrDef *instrDef);
370 void WriteLabel(pugi::xml_node currentNode,
Label *label);
371 void WriteLabelAbbr(pugi::xml_node currentNode,
LabelAbbr *labelAbbr);
372 void WriteLayerDef(pugi::xml_node currentNode,
LayerDef *layerDef);
373 void WriteTuning(pugi::xml_node currentNode,
Tuning *tuning);
374 void WriteCourse(pugi::xml_node currentNode,
Course *course);
375 void WriteSymbolTable(pugi::xml_node currentNode,
SymbolTable *symbolTable);
376 void WriteMeasure(pugi::xml_node currentNode,
Measure *measure);
377 void WriteMeterSigGrp(pugi::xml_node currentNode,
MeterSigGrp *meterSigGrp);
378 void WriteFb(pugi::xml_node currentNode,
Fb *fb);
379 void WriteStaff(pugi::xml_node currentNode,
Staff *staff);
380 void WriteLayer(pugi::xml_node currentNode,
Layer *layer);
387 void WriteAccid(pugi::xml_node currentNode,
Accid *accid);
389 void WriteArtic(pugi::xml_node currentNode,
Artic *artic);
390 void WriteBarLine(pugi::xml_node currentNode,
BarLine *barLine);
391 void WriteBeam(pugi::xml_node currentNode,
Beam *beam);
392 void WriteBeatRpt(pugi::xml_node currentNode,
BeatRpt *beatRpt);
393 void WriteBTrem(pugi::xml_node currentNode,
BTrem *bTrem);
394 void WriteChord(pugi::xml_node currentNode,
Chord *chord);
395 void WriteClef(pugi::xml_node currentNode,
Clef *clef);
396 void WriteCustos(pugi::xml_node currentNode,
Custos *custos);
397 void WriteDivLine(pugi::xml_node currentNode,
DivLine *divLine);
398 void WriteDot(pugi::xml_node currentNode,
Dot *dot);
399 void WriteFTrem(pugi::xml_node currentNode,
FTrem *fTrem);
401 void WriteGraceGrp(pugi::xml_node currentNode,
GraceGrp *graceGrp);
402 void WriteHalfmRpt(pugi::xml_node currentNode,
HalfmRpt *halfmRpt);
403 void WriteKeyAccid(pugi::xml_node currentNode,
KeyAccid *keyAccid);
404 void WriteKeySig(pugi::xml_node currentNode,
KeySig *keySig);
405 void WriteLigature(pugi::xml_node currentNode,
Ligature *ligature);
406 void WriteLiquescent(pugi::xml_node currentNode,
Liquescent *liquescent);
407 void WriteMensur(pugi::xml_node currentNode,
Mensur *mensur);
408 void WriteMeterSig(pugi::xml_node currentNode,
MeterSig *meterSig);
409 void WriteMRest(pugi::xml_node currentNode,
MRest *mRest);
410 void WriteMRpt(pugi::xml_node currentNode,
MRpt *mRpt);
411 void WriteMRpt2(pugi::xml_node currentNode,
MRpt2 *mRpt2);
412 void WriteMSpace(pugi::xml_node currentNode,
MSpace *mSpace);
413 void WriteMultiRest(pugi::xml_node currentNode,
MultiRest *multiRest);
414 void WriteMultiRpt(pugi::xml_node currentNode,
MultiRpt *multiRpt);
415 void WriteNc(pugi::xml_node currentNode,
Nc *nc);
416 void WriteNeume(pugi::xml_node currentNode,
Neume *neume);
417 void WriteNote(pugi::xml_node currentNode,
Note *note);
418 void WriteOriscus(pugi::xml_node currentNode,
Oriscus *oriscus);
419 void WritePlica(pugi::xml_node currentNode,
Plica *plica);
420 void WriteProport(pugi::xml_node currentNode,
Proport *proport);
421 void WriteQuilisma(pugi::xml_node currentNode,
Quilisma *quilisma);
422 void WriteRest(pugi::xml_node currentNode,
Rest *rest);
423 void WriteSpace(pugi::xml_node currentNode,
Space *space);
424 void WriteStem(pugi::xml_node currentNode,
Stem *stem);
425 void WriteSyllable(pugi::xml_node currentNode,
Syllable *syllable);
426 void WriteTabDurSym(pugi::xml_node currentNode,
TabDurSym *tabDurSym);
427 void WriteTabGrp(pugi::xml_node currentNode,
TabGrp *tabGrp);
428 void WriteTuplet(pugi::xml_node currentNode,
Tuplet *tuplet);
434 void WriteAnchoredText(pugi::xml_node currentNode,
AnchoredText *anchoredText);
436 void WriteArpeg(pugi::xml_node currentNode,
Arpeg *arpeg);
437 void WriteBeamSpan(pugi::xml_node currentNode,
BeamSpan *beamSpan);
438 void WriteBracketSpan(pugi::xml_node currentNode,
BracketSpan *bracketSpan);
439 void WriteBreath(pugi::xml_node currentNode,
Breath *breath);
440 void WriteCaesura(pugi::xml_node currentNode,
Caesura *caesura);
441 void WriteCpMark(pugi::xml_node currentNode,
CpMark *cpMark);
442 void WriteDir(pugi::xml_node currentNode,
Dir *dir);
443 void WriteDynam(pugi::xml_node currentNode,
Dynam *dynam);
444 void WriteFermata(pugi::xml_node currentNode,
Fermata *fermata);
445 void WriteFing(pugi::xml_node currentNode,
Fing *fing);
446 void WriteGliss(pugi::xml_node currentNode,
Gliss *gliss);
447 void WriteHairpin(pugi::xml_node currentNode,
Hairpin *hairpin);
448 void WriteHarm(pugi::xml_node currentNode,
Harm *harm);
449 void WriteLv(pugi::xml_node currentNode,
Lv *lv);
450 void WriteMNum(pugi::xml_node currentNode,
MNum *mnum);
451 void WriteMordent(pugi::xml_node currentNode,
Mordent *mordent);
452 void WriteOctave(pugi::xml_node currentNode,
Octave *octave);
453 void WriteOrnam(pugi::xml_node currentNode,
Ornam *ornam);
454 void WritePedal(pugi::xml_node currentNode,
Pedal *pedal);
455 void WritePhrase(pugi::xml_node currentNode,
Phrase *phrase);
456 void WritePitchInflection(pugi::xml_node currentNode,
PitchInflection *pitchInflection);
457 void WriteReh(pugi::xml_node currentNode,
Reh *reh);
458 void WriteRepeatMark(pugi::xml_node currentNode,
RepeatMark *repeatMark);
459 void WriteSlur(pugi::xml_node currentNode,
Slur *slur);
460 void WriteTempo(pugi::xml_node currentNode,
Tempo *tempo);
461 void WriteTie(pugi::xml_node currentNode,
Tie *tie);
462 void WriteTrill(pugi::xml_node currentNode,
Trill *trill);
463 void WriteTurn(pugi::xml_node currentNode,
Turn *turn);
469 void WriteF(pugi::xml_node currentNode,
F *f);
471 void WriteFig(pugi::xml_node currentNode,
Fig *fig);
472 void WriteLb(pugi::xml_node currentNode,
Lb *lb);
473 void WriteNum(pugi::xml_node currentNode,
Num *num);
474 void WriteRend(pugi::xml_node currentNode,
Rend *rend);
475 void WriteSvg(pugi::xml_node currentNode,
Svg *svg);
476 void WriteSymbol(pugi::xml_node currentNode,
Symbol *symbol);
477 void WriteSymbolDef(pugi::xml_node currentNode,
SymbolDef *symbolDef);
478 void WriteText(pugi::xml_node currentNode,
Text *text);
484 void WriteAbbr(pugi::xml_node currentNode,
Abbr *abbr);
486 void WriteAdd(pugi::xml_node currentNode,
Add *add);
487 void WriteAnnot(pugi::xml_node currentNode,
Annot *annot);
488 void WriteApp(pugi::xml_node currentNode,
App *app);
489 void WriteChoice(pugi::xml_node currentNode,
Choice *choice);
490 void WriteCorr(pugi::xml_node currentNode,
Corr *corr);
491 void WriteDamage(pugi::xml_node currentNode,
Damage *damage);
492 void WriteDel(pugi::xml_node currentNode,
Del *del);
493 void WriteExpan(pugi::xml_node currentNode,
Expan *expan);
494 void WriteLem(pugi::xml_node currentNode,
Lem *lem);
495 void WriteOrig(pugi::xml_node currentNode,
Orig *orig);
496 void WriteRdg(pugi::xml_node currentNode,
Rdg *rdg);
497 void WriteRef(pugi::xml_node currentNode,
Ref *
Ref);
498 void WriteReg(pugi::xml_node currentNode,
Reg *
Reg);
499 void WriteRestore(pugi::xml_node currentNode,
Restore *restore);
500 void WriteSic(pugi::xml_node currentNode,
Sic *sic);
501 void WriteSubst(pugi::xml_node currentNode,
Subst *subst);
502 void WriteSupplied(pugi::xml_node currentNode,
Supplied *supplied);
503 void WriteUnclear(pugi::xml_node currentNode,
Unclear *unclear);
509 void WriteVerse(pugi::xml_node currentNode,
Verse *verse);
511 void WriteSyl(pugi::xml_node currentNode,
Syl *syl);
512 void WriteZone(pugi::xml_node currentNode,
Zone *zone);
513 void WriteSurface(pugi::xml_node currentNode,
Surface *surface);
514 void WriteFacsimile(pugi::xml_node currentNode,
Facsimile *facsimile);
515 void WriteGraphic(pugi::xml_node currentNode,
Graphic *graphic);
521 void WriteUnsupportedAttr(pugi::xml_node currentNode,
Object *
object);
527 void WriteControlElement(pugi::xml_node element,
ControlElement *
object);
529 void WriteEditorialElement(pugi::xml_node element,
EditorialElement *
object);
530 void WriteLayerElement(pugi::xml_node element,
LayerElement *
object);
532 void WriteRunningElement(pugi::xml_node element,
RunningElement *
object);
533 void WriteScoreDefElement(pugi::xml_node element,
ScoreDefElement *
object);
534 void WriteSystemElement(pugi::xml_node element,
SystemElement *
object);
535 void WriteTextElement(pugi::xml_node element,
TextElement *
object);
537 void WriteAltSymInterface(pugi::xml_node currentNode,
AltSymInterface *interface);
538 void WriteAreaPosInterface(pugi::xml_node currentNode,
AreaPosInterface *interface);
539 void WriteDurationInterface(pugi::xml_node currentNode,
DurationInterface *interface);
540 void WriteLinkingInterface(pugi::xml_node currentNode,
LinkingInterface *interface);
542 void WritePitchInterface(pugi::xml_node currentNode,
PitchInterface *interface);
543 void WritePlistInterface(pugi::xml_node currentNode,
PlistInterface *interface);
544 void WritePositionInterface(pugi::xml_node currentNode,
PositionInterface *interface);
545 void WriteScoreDefInterface(pugi::xml_node currentNode,
ScoreDefInterface *interface);
546 void WriteTextDirInterface(pugi::xml_node currentNode,
TextDirInterface *interface);
547 void WriteTimePointInterface(pugi::xml_node currentNode,
TimePointInterface *interface);
556 std::u32string EscapeSMuFL(std::u32string data);
559 std::string IDToMeiStr(
Object *element);
561 std::string DocTypeToStr(DocType type);
567 std::ostringstream m_streamStringOutput;
569 bool m_scoreBasedMEI;
572 pugi::xml_node m_mei;
575 pugi::xml_node m_currentNode;
577 std::list<pugi::xml_node> m_nodeStack;
579 std::stack<Object *> m_boundaries;
581 std::deque<Object *> m_objectStack;
586 MatchLocation m_filterMatchLocation;
587 Object *m_firstFilterMatch;
591 std::string m_firstMeasureID;
592 std::string m_lastMeasureID;
593 RangeMatchLocation m_measureFilterMatchLocation;
594 std::string m_mdivID;
595 MatchLocation m_mdivFilterMatchLocation;
600 SetOfObjects m_referredObjects;
618 bool Import(
const std::string &mei)
override;
621 bool ReadDoc(pugi::xml_node root);
622 bool ReadIncipits(pugi::xml_node root);
625 bool ReadMdiv(
Object *parent, pugi::xml_node parentNode,
bool isVisible);
626 bool ReadMdivChildren(
Object *parent, pugi::xml_node parentNode,
bool isVisible);
627 bool ReadScore(
Object *parent, pugi::xml_node parentNode);
633 bool ReadPages(
Object *parent, pugi::xml_node parentNode);
635 bool ReadPage(
Object *parent, pugi::xml_node parentNode);
636 bool ReadPageChildren(
Object *parent, pugi::xml_node parentNode);
637 bool ReadPageMilestoneEnd(
Object *parent, pugi::xml_node milestoneEnd);
638 bool ReadSystem(
Object *parent, pugi::xml_node system);
639 bool ReadSystemChildren(
Object *parent, pugi::xml_node parentNode);
640 bool ReadSystemMilestoneEnd(
Object *parent, pugi::xml_node milestoneEnd);
646 bool ReadSection(
Object *parent, pugi::xml_node section);
648 bool ReadSectionChildren(
Object *parent, pugi::xml_node parentNode);
649 bool ReadEnding(
Object *parent, pugi::xml_node ending);
650 bool ReadExpansion(
Object *parent, pugi::xml_node expansion);
651 bool ReadPb(
Object *parent, pugi::xml_node pb);
652 bool ReadSb(
Object *parent, pugi::xml_node sb);
663 bool ReadScoreDef(
Object *parent, pugi::xml_node scoreDef);
665 bool ReadScoreDefChildren(
Object *parent, pugi::xml_node parentNode);
666 bool ReadGrpSym(
Object *parent, pugi::xml_node grpSym);
667 bool ReadPgFoot(
Object *parent, pugi::xml_node pgFoot);
668 bool ReadPgHead(
Object *parent, pugi::xml_node pgHead);
669 bool ReadDiv(
Object *parent, pugi::xml_node div);
670 bool ReadRunningChildren(
Object *parent, pugi::xml_node parentNode,
Object *filter = NULL);
671 bool ReadStaffGrp(
Object *parent, pugi::xml_node staffGrp);
672 bool ReadStaffGrpChildren(
Object *parent, pugi::xml_node parentNode);
673 bool ReadStaffDef(
Object *parent, pugi::xml_node staffDef);
674 bool ReadStaffDefChildren(
Object *parent, pugi::xml_node parentNode);
675 bool ReadInstrDef(
Object *parent, pugi::xml_node instrDef);
676 bool ReadLabel(
Object *parent, pugi::xml_node label);
677 bool ReadLabelAbbr(
Object *parent, pugi::xml_node labelAbbr);
678 bool ReadTuning(
Object *parent, pugi::xml_node tuning);
679 bool ReadTuningChildren(
Object *parent, pugi::xml_node parentNode);
680 bool ReadCourse(
Object *parent, pugi::xml_node course);
681 bool ReadSymbolTable(
Object *parent, pugi::xml_node parentNode);
682 bool ReadMeasure(
Object *parent, pugi::xml_node measure);
683 bool ReadMeasureChildren(
Object *parent, pugi::xml_node parentNode);
684 bool ReadMeterSigGrp(
Object *parent, pugi::xml_node meterSigGrp);
685 bool ReadMeterSigGrpChildren(
Object *parent, pugi::xml_node parentNode);
686 bool ReadFb(
Object *parent, pugi::xml_node fb);
687 bool ReadFbChildren(
Object *parent, pugi::xml_node parentNode);
688 bool ReadNum(
Object *parent, pugi::xml_node parentNode);
689 bool ReadStaff(
Object *parent, pugi::xml_node staff);
690 bool ReadStaffChildren(
Object *parent, pugi::xml_node parentNode);
691 bool ReadLayer(
Object *parent, pugi::xml_node layer);
692 bool ReadLayerDef(
Object *parent, pugi::xml_node layerDef);
693 bool ReadLayerDefChildren(
Object *parent, pugi::xml_node parentNode);
694 bool ReadLayerChildren(
Object *parent, pugi::xml_node parentNode,
Object *filter = NULL);
695 bool ReadTextChildren(
Object *parent, pugi::xml_node parentNode,
Object *filter = NULL);
696 bool ReadSymbolDefChildren(
Object *parent, pugi::xml_node parentNode,
Object *filter = NULL);
702 bool ReadAccid(
Object *parent, pugi::xml_node accid);
704 bool ReadArtic(
Object *parent, pugi::xml_node artic);
705 bool ReadBarLine(
Object *parent, pugi::xml_node barLine);
706 bool ReadBeam(
Object *parent, pugi::xml_node beam);
707 bool ReadBeatRpt(
Object *parent, pugi::xml_node beatRpt);
708 bool ReadBTrem(
Object *parent, pugi::xml_node bTrem);
709 bool ReadChord(
Object *parent, pugi::xml_node chord);
710 bool ReadClef(
Object *parent, pugi::xml_node clef);
711 bool ReadCustos(
Object *parent, pugi::xml_node custos);
712 bool ReadDivLine(
Object *parent, pugi::xml_node divLine);
713 bool ReadDot(
Object *parent, pugi::xml_node dot);
714 bool ReadFTrem(
Object *parent, pugi::xml_node fTrem);
715 bool ReadGenericLayerElement(
Object *parent, pugi::xml_node element);
716 bool ReadGraceGrp(
Object *parent, pugi::xml_node graceGrp);
717 bool ReadHalfmRpt(
Object *parent, pugi::xml_node halfmRpt);
718 bool ReadKeyAccid(
Object *parent, pugi::xml_node keyAccid);
719 bool ReadKeySig(
Object *parent, pugi::xml_node keySig);
720 bool ReadLigature(
Object *parent, pugi::xml_node ligature);
721 bool ReadLiquescent(
Object *parent, pugi::xml_node liquescent);
722 bool ReadMensur(
Object *parent, pugi::xml_node mensur);
723 bool ReadMeterSig(
Object *parent, pugi::xml_node meterSig);
724 bool ReadMRest(
Object *parent, pugi::xml_node mRest);
725 bool ReadMRpt(
Object *parent, pugi::xml_node mRpt);
726 bool ReadMRpt2(
Object *parent, pugi::xml_node mRpt2);
727 bool ReadMSpace(
Object *parent, pugi::xml_node mSpace);
728 bool ReadMultiRest(
Object *parent, pugi::xml_node multiRest);
729 bool ReadMultiRpt(
Object *parent, pugi::xml_node multiRpt);
730 bool ReadNc(
Object *parent, pugi::xml_node nc);
731 bool ReadNeume(
Object *parent, pugi::xml_node note);
732 bool ReadNote(
Object *parent, pugi::xml_node note);
733 bool ReadOriscus(
Object *parent, pugi::xml_node oriscus);
734 bool ReadPlica(
Object *parent, pugi::xml_node plica);
735 bool ReadProport(
Object *parent, pugi::xml_node proport);
736 bool ReadQuilisma(
Object *parent, pugi::xml_node quilisma);
737 bool ReadRest(
Object *parent, pugi::xml_node rest);
738 bool ReadSpace(
Object *parent, pugi::xml_node space);
739 bool ReadStem(
Object *parent, pugi::xml_node stem);
740 bool ReadSyl(
Object *parent, pugi::xml_node syl);
741 bool ReadSyllable(
Object *parent, pugi::xml_node syllable);
742 bool ReadTabDurSym(
Object *parent, pugi::xml_node tabDurSym);
743 bool ReadTabGrp(
Object *parent, pugi::xml_node tabGrp);
744 bool ReadTuplet(
Object *parent, pugi::xml_node tuplet);
745 bool ReadVerse(
Object *parent, pugi::xml_node verse);
751 bool ReadAnchoredText(
Object *parent, pugi::xml_node anchoredText);
753 bool ReadArpeg(
Object *parent, pugi::xml_node arpeg);
754 bool ReadBeamSpan(
Object *parent, pugi::xml_node beamSpan);
755 bool ReadBracketSpan(
Object *parent, pugi::xml_node bracketSpan);
756 bool ReadBreath(
Object *parent, pugi::xml_node breath);
757 bool ReadCaesura(
Object *parent, pugi::xml_node caesura);
758 bool ReadCpMark(
Object *parent, pugi::xml_node cpMark);
759 bool ReadDir(
Object *parent, pugi::xml_node dir);
760 bool ReadDynam(
Object *parent, pugi::xml_node dynam);
761 bool ReadFermata(
Object *parent, pugi::xml_node fermata);
762 bool ReadFing(
Object *parent, pugi::xml_node fing);
763 bool ReadGliss(
Object *parent, pugi::xml_node gliss);
764 bool ReadHairpin(
Object *parent, pugi::xml_node hairpin);
765 bool ReadHarm(
Object *parent, pugi::xml_node harm);
766 bool ReadLv(
Object *parent, pugi::xml_node lv);
767 bool ReadMNum(
Object *parent, pugi::xml_node mnum);
768 bool ReadMordent(
Object *parent, pugi::xml_node mordent);
769 bool ReadOctave(
Object *parent, pugi::xml_node octave);
770 bool ReadOrnam(
Object *parent, pugi::xml_node ornam);
771 bool ReadPedal(
Object *parent, pugi::xml_node pedal);
772 bool ReadPhrase(
Object *parent, pugi::xml_node phrase);
773 bool ReadPitchInflection(
Object *parent, pugi::xml_node pitchInflection);
774 bool ReadRepeatMark(
Object *parent, pugi::xml_node repeatMark);
775 bool ReadReh(
Object *parent, pugi::xml_node reh);
776 bool ReadSlur(
Object *parent, pugi::xml_node slur);
777 bool ReadTempo(
Object *parent, pugi::xml_node tempo);
778 bool ReadTie(
Object *parent, pugi::xml_node tie);
779 bool ReadTrill(
Object *parent, pugi::xml_node trill);
780 bool ReadTurn(
Object *parent, pugi::xml_node turn);
786 bool ReadF(
Object *parent, pugi::xml_node f);
788 bool ReadFig(
Object *parent, pugi::xml_node fig);
789 bool ReadLb(
Object *parent, pugi::xml_node lb);
790 bool ReadRend(
Object *parent, pugi::xml_node rend);
791 bool ReadSvg(
Object *parent, pugi::xml_node svg);
792 bool ReadSymbol(
Object *parent, pugi::xml_node symbol);
793 bool ReadSymbolDef(
Object *parent, pugi::xml_node symbolDef);
794 bool ReadText(
Object *parent, pugi::xml_node text,
bool trimLeft,
bool trimRight);
801 bool ReadEditorialElement(
Object *parent, pugi::xml_node app, EditorialLevel level,
Object *filter = NULL);
803 bool ReadAbbr(
Object *parent, pugi::xml_node abbr, EditorialLevel level,
Object *filter = NULL);
804 bool ReadAdd(
Object *parent, pugi::xml_node add, EditorialLevel level,
Object *filter = NULL);
805 bool ReadAnnot(
Object *parent, pugi::xml_node annot);
806 bool ReadApp(
Object *parent, pugi::xml_node app, EditorialLevel level,
Object *filter = NULL);
807 bool ReadAppChildren(
Object *parent, pugi::xml_node parentNode, EditorialLevel level,
Object *filter = NULL);
808 bool ReadChoice(
Object *parent, pugi::xml_node choice, EditorialLevel level,
Object *filter = NULL);
809 bool ReadChoiceChildren(
Object *parent, pugi::xml_node parentNode, EditorialLevel level,
Object *filter = NULL);
810 bool ReadCorr(
Object *parent, pugi::xml_node corr, EditorialLevel level,
Object *filter = NULL);
811 bool ReadDamage(
Object *parent, pugi::xml_node damage, EditorialLevel level,
Object *filter = NULL);
812 bool ReadDel(
Object *parent, pugi::xml_node del, EditorialLevel level,
Object *filter = NULL);
813 bool ReadExpan(
Object *parent, pugi::xml_node expan, EditorialLevel level,
Object *filter = NULL);
814 bool ReadLem(
Object *parent, pugi::xml_node lem, EditorialLevel level,
Object *filter = NULL);
815 bool ReadOrig(
Object *parent, pugi::xml_node orig, EditorialLevel level,
Object *filter = NULL);
816 bool ReadRdg(
Object *parent, pugi::xml_node rdg, EditorialLevel level,
Object *filter = NULL);
817 bool ReadRef(
Object *parent, pugi::xml_node ref, EditorialLevel level,
Object *filter = NULL);
818 bool ReadReg(
Object *parent, pugi::xml_node reg, EditorialLevel level,
Object *filter = NULL);
819 bool ReadRestore(
Object *parent, pugi::xml_node restore, EditorialLevel level,
Object *filter = NULL);
820 bool ReadSic(
Object *parent, pugi::xml_node sic, EditorialLevel level,
Object *filter = NULL);
821 bool ReadSubst(
Object *parent, pugi::xml_node subst, EditorialLevel level,
Object *filter = NULL);
822 bool ReadSubstChildren(
Object *parent, pugi::xml_node parentNode, EditorialLevel level,
Object *filter = NULL);
823 bool ReadSupplied(
Object *parent, pugi::xml_node supplied, EditorialLevel level,
Object *filter = NULL);
824 bool ReadUnclear(
Object *parent, pugi::xml_node unclear, EditorialLevel level,
Object *filter = NULL);
825 bool ReadEditorialChildren(
Object *parent, pugi::xml_node supplied, EditorialLevel level,
Object *filter = NULL);
831 bool ReadControlElement(pugi::xml_node element,
ControlElement *
object);
833 bool ReadEditorialElement(pugi::xml_node element,
EditorialElement *
object);
834 bool ReadLayerElement(pugi::xml_node element,
LayerElement *
object);
836 bool ReadRunningElement(pugi::xml_node element,
RunningElement *
object);
837 bool ReadScoreDefElement(pugi::xml_node element,
ScoreDefElement *
object);
838 bool ReadSystemElement(pugi::xml_node element,
SystemElement *
object);
839 bool ReadTextElement(pugi::xml_node element,
TextElement *
object);
841 bool ReadAltSymInterface(pugi::xml_node element,
AltSymInterface *interface);
842 bool ReadAreaPosInterface(pugi::xml_node element,
AreaPosInterface *interface);
843 bool ReadDurationInterface(pugi::xml_node element,
DurationInterface *interface);
844 bool ReadLinkingInterface(pugi::xml_node element,
LinkingInterface *interface);
846 bool ReadPitchInterface(pugi::xml_node element,
PitchInterface *interface);
847 bool ReadPlistInterface(pugi::xml_node element,
PlistInterface *interface);
848 bool ReadPositionInterface(pugi::xml_node element,
PositionInterface *interface);
849 bool ReadScoreDefInterface(pugi::xml_node element,
ScoreDefInterface *interface);
850 bool ReadTextDirInterface(pugi::xml_node element,
TextDirInterface *interface);
858 bool ReadFacsimile(
Doc *doc, pugi::xml_node facsimile);
860 bool ReadGraphic(
Object *parent, pugi::xml_node graphic);
861 bool ReadSurface(
Facsimile *parent, pugi::xml_node surface);
862 bool ReadTupletSpanAsTuplet(
Measure *measure, pugi::xml_node tupletSpan);
863 bool ReadZone(
Surface *parent, pugi::xml_node zone);
869 void ReadUnsupportedAttr(pugi::xml_node element,
Object *
object);
874 bool IsEditorialElementName(std::string elementName);
879 void NormalizeAttributes(pugi::xml_node &xmlElement);
886 bool ReadScoreBasedMei(pugi::xml_node element,
Score *parent);
891 void SetMeiID(pugi::xml_node element,
Object *
object);
893 DocType StrToDocType(std::string type);
894 std::u32string LeftTrim(std::u32string str);
895 std::u32string RightTrim(std::u32string str);
896 bool ReadXMLComment(
Object *
object, pugi::xml_node element);
904 void UpgradeKeySigTo_5_0(pugi::xml_node keySig);
905 void UpgradePageTo_5_0(
Page *page);
906 void UpgradePgHeadFootTo_5_0(pugi::xml_node element);
907 void UpgradeMeasureTo_5_0(pugi::xml_node measure);
908 void UpgradeMeterSigTo_5_0(pugi::xml_node meterSig,
MeterSig *vrvMeterSig);
909 void UpgradeScoreDefElementTo_5_0(pugi::xml_node scoreDefElement);
910 void UpgradeStaffTo_5_0(pugi::xml_node staff);
911 void UpgradeLayerElementTo_5_0(pugi::xml_node element);
912 void UpgradeRendTo_5_0(pugi::xml_node element);
914 void UpgradeBeatRptTo_4_0_0(pugi::xml_node beatRpt,
BeatRpt *vrvBeatRpt);
915 void UpgradeDurGesTo_4_0_0(pugi::xml_node element,
DurationInterface *interface);
916 void UpgradeFTremTo_4_0_0(pugi::xml_node fTrem,
FTrem *vrvFTrem);
917 void UpgradeMensurTo_5_0(pugi::xml_node mensur,
Mensur *vrvMensur);
918 void UpgradeMordentTo_4_0_0(pugi::xml_node mordent,
Mordent *vrvMordent);
919 void UpgradeScoreDefElementTo_4_0_0(pugi::xml_node scoreDefElement,
ScoreDefElement *vrvScoreDefElement);
920 void UpgradeStaffDefTo_4_0_0(pugi::xml_node staffDef,
StaffDef *vrvStaffDef);
921 void UpgradeStaffGrpTo_4_0_0(pugi::xml_node staffGrp,
StaffGrp *vrvStaffGrp);
922 void UpgradeTurnTo_4_0_0(pugi::xml_node turn,
Turn *vrvTurn);
924 void UpgradeMeasureTo_3_0_0(
Measure *measure,
System *system);
925 void UpgradePageTo_3_0_0(
Page *page,
Doc *doc);
931 void ReadAccidAttr(pugi::xml_node node,
Object *
object);
941 std::string m_filename;
946 meiVersion_MEIVERSION m_meiversion;
951 bool m_readingScoreBased;
961 bool IsAllowed(std::string element,
Object *filterParent);
967 pugi::xml_node m_selectedMdiv;
972 std::string m_comment;
981 static const std::vector<std::string> s_editorialElementNames;