diff --git a/include/vrv/annotscore.h b/include/vrv/annotscore.h index ce099d6b72..b35110d445 100644 --- a/include/vrv/annotscore.h +++ b/include/vrv/annotscore.h @@ -23,7 +23,7 @@ namespace vrv { /** * This class models the MEI element where @type is score. */ -class AnnotScore : public ControlElement, public TimeSpanningInterface, public AttPlist { +class AnnotScore : public ControlElement, public TimeSpanningInterface, public AttPlist { public: /** * @name Constructors, destructors, and other standard methods @@ -32,7 +32,7 @@ class AnnotScore : public ControlElement, public TimeSpanningInterface, public ///@{ AnnotScore(); virtual ~AnnotScore(); - //Object *Clone() const override { return new AnnotScore(*this); } + // Object *Clone() const override { return new AnnotScore(*this); } void Reset() override; std::string GetClassName() const override { return "AnnotScore"; } ///@} @@ -58,7 +58,6 @@ class AnnotScore : public ControlElement, public TimeSpanningInterface, public */ bool IsSupportedChild(Object *object) override; - ///@} //----------// diff --git a/src/annotscore.cpp b/src/annotscore.cpp index 1210dbdb39..7b37810eb8 100644 --- a/src/annotscore.cpp +++ b/src/annotscore.cpp @@ -28,8 +28,7 @@ namespace vrv { static const ClassRegistrar s_factory("annotScore", ANNOTSCORE); -AnnotScore::AnnotScore() - : ControlElement(ANNOTSCORE, "annotscore-"), AttPlist() +AnnotScore::AnnotScore() : ControlElement(ANNOTSCORE, "annotscore-"), AttPlist() { this->RegisterInterface(TimeSpanningInterface::GetAttClasses(), TimeSpanningInterface::IsInterface()); this->RegisterAttClass(ATT_PLIST); diff --git a/src/iohumdrum.cpp b/src/iohumdrum.cpp index e4a02f50c3..428ceab63f 100644 --- a/src/iohumdrum.cpp +++ b/src/iohumdrum.cpp @@ -2939,7 +2939,7 @@ void HumdrumInput::createDigitalSource(pugi::xml_node sourceDesc) pugi::xml_node bibl = source.append_child("bibl"); bibl.append_copy(m_simpleTitle); for (pugi::xml_node_iterator childIt = m_simpleComposersDoc.begin(); childIt != m_simpleComposersDoc.end(); - ++childIt) { + ++childIt) { bibl.append_copy(*childIt); } @@ -3691,7 +3691,7 @@ void HumdrumInput::createPrintedSource(pugi::xml_node sourceDesc) bibl.append_copy(m_simpleTitle); for (pugi::xml_node_iterator childIt = m_simpleComposersDoc.begin(); childIt != m_simpleComposersDoc.end(); - ++childIt) { + ++childIt) { bibl.append_copy(*childIt); } diff --git a/src/iomei.cpp b/src/iomei.cpp index 00ccad1515..2aa66a0f2b 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -472,10 +472,12 @@ bool MEIOutput::WriteObjectInternal(Object *object, bool useCustomScoreDef) else if (object->Is(ANCHOREDTEXT)) { m_currentNode = m_currentNode.append_child("anchoredText"); this->WriteAnchoredText(m_currentNode, vrv_cast(object)); - } else if (object->Is(ANNOTSCORE)){ - m_currentNode = m_currentNode.append_child("annot"); - this->WriteAnnotScore(m_currentNode, vrv_cast(object)); - } else if (object->Is(ARPEG)) { + } + else if (object->Is(ANNOTSCORE)) { + m_currentNode = m_currentNode.append_child("annot"); + this->WriteAnnotScore(m_currentNode, vrv_cast(object)); + } + else if (object->Is(ARPEG)) { m_currentNode = m_currentNode.append_child("arpeg"); this->WriteArpeg(m_currentNode, vrv_cast(object)); } @@ -835,10 +837,12 @@ bool MEIOutput::WriteObjectInternal(Object *object, bool useCustomScoreDef) else if (object->Is(ANNOT)) { m_currentNode = m_currentNode.append_child("annot"); this->WriteAnnot(m_currentNode, vrv_cast(object)); - } else if (object->Is(APP)) { + } + else if (object->Is(APP)) { m_currentNode = m_currentNode.append_child("app"); this->WriteApp(m_currentNode, vrv_cast(object)); - } else if (object->Is(CHOICE)) { + } + else if (object->Is(CHOICE)) { m_currentNode = m_currentNode.append_child("choice"); this->WriteChoice(m_currentNode, vrv_cast(object)); } @@ -1972,11 +1976,11 @@ void MEIOutput::WriteAnnotScore(pugi::xml_node currentNode, AnnotScore *annotSco this->WriteControlElement(currentNode, annotScore); annotScore->WritePlist(currentNode); // FIXME: currently ignoring annot contents -/* // special case where we keep the pugi::nodes - for (pugi::xml_node child = annotScore->m_content.first_child(); child; child = child.next_sibling()) { - currentNode.append_copy(child); - } - */ + /* // special case where we keep the pugi::nodes + for (pugi::xml_node child = annotScore->m_content.first_child(); child; child = child.next_sibling()) { + currentNode.append_copy(child); + } + */ } void MEIOutput::WriteArpeg(pugi::xml_node currentNode, Arpeg *arpeg) @@ -5485,9 +5489,10 @@ bool MEIInput::ReadMeasureChildren(Object *parent, pugi::xml_node parentNode) this->NormalizeAttributes(current); // editorial if (this->IsEditorialElementName(currentName)) { - if(currentName == "annot" && this->IsAnnotScore(current)) { + if (currentName == "annot" && this->IsAnnotScore(current)) { success = this->ReadAnnotScore(parent, current); - } else { + } + else { success = this->ReadEditorialElement(parent, current, EDITORIAL_MEASURE); } } @@ -7687,21 +7692,21 @@ bool MEIInput::ReadAnnot(Object *parent, pugi::xml_node annot) bool MEIInput::ReadAnnotScore(Object *parent, pugi::xml_node annot) { - AnnotScore *vrvAnnotScore = new AnnotScore(); - //this->ReadEditorialElement(annot, vrvAnnotScore); + AnnotScore *vrvAnnotScore = new AnnotScore(); + // this->ReadEditorialElement(annot, vrvAnnotScore); vrvAnnotScore->ReadPlist(annot); - //vrvAnnotScore->ReadSource(annot); + // vrvAnnotScore->ReadSource(annot); parent->AddChild(vrvAnnotScore); - //vrvAnnotScore->m_content.reset(); + // vrvAnnotScore->m_content.reset(); bool hasNonTextContent = false; // copy all the nodes inside into the document for (pugi::xml_node child = annot.first_child(); child; child = child.next_sibling()) { const std::string nodeName = child.name(); if (!hasNonTextContent && (!nodeName.empty())) hasNonTextContent = true; - //vrvAnnotScore->m_content.append_copy(child); + // vrvAnnotScore->m_content.append_copy(child); } this->ReadUnsupportedAttr(annot, vrvAnnotScore); // Unless annot has only text we do not load children because they are preserved in Annot::m_content @@ -7709,10 +7714,9 @@ bool MEIInput::ReadAnnotScore(Object *parent, pugi::xml_node annot) return true; } else { - //vrvAnnot->m_content.remove_children(); + // vrvAnnot->m_content.remove_children(); return this->ReadTextChildren(vrvAnnotScore, annot, vrvAnnotScore); } - } bool MEIInput::ReadApp(Object *parent, pugi::xml_node app, EditorialLevel level, Object *filter) @@ -8313,7 +8317,8 @@ bool MEIInput::ReadXMLComment(Object *object, pugi::xml_node element) return true; } -bool MEIInput::IsAnnotScore(pugi::xml_node annot) { +bool MEIInput::IsAnnotScore(pugi::xml_node annot) +{ // If the annotation is a score annotation, it'll have @type="score" (we can also guess) std::string value = annot.attribute("type").value(); return value == "score"; diff --git a/src/iomusxml.cpp b/src/iomusxml.cpp index eb9d68fb6d..27b267a541 100644 --- a/src/iomusxml.cpp +++ b/src/iomusxml.cpp @@ -3492,7 +3492,7 @@ void MusicXmlInput::ReadMusicXmlNote( m_trillStack.push_back({ trill, openTrill }); } for (pugi::xml_node xmlAccidMark = xmlTrill.node().next_sibling("accidental-mark"); xmlAccidMark; - xmlAccidMark = xmlAccidMark.next_sibling("accidental-mark")) { + xmlAccidMark = xmlAccidMark.next_sibling("accidental-mark")) { if (HasAttributeWithValue(xmlAccidMark, "placement", "below")) { trill->SetAccidlower(ConvertAccidentalToAccid(xmlAccidMark.text().as_string())); } @@ -3530,7 +3530,7 @@ void MusicXmlInput::ReadMusicXmlNote( turn->SetPlace(turn->AttPlacementRelStaff::StrToStaffrel(xmlTurn.node().attribute("placement").as_string())); turn->SetForm(turnLog_FORM_upper); for (pugi::xml_node xmlAccidMark = xmlTurn.node().next_sibling("accidental-mark"); xmlAccidMark; - xmlAccidMark = xmlAccidMark.next_sibling("accidental-mark")) { + xmlAccidMark = xmlAccidMark.next_sibling("accidental-mark")) { if (HasAttributeWithValue(xmlAccidMark, "placement", "above")) { turn->SetAccidupper(ConvertAccidentalToAccid(xmlAccidMark.text().as_string())); } @@ -4691,7 +4691,7 @@ std::pair, int> MusicXmlInput::GetMeterSigGrpValues(const pugi: int maxUnit = 0; std::vector meterCounts; for (auto iter1 = beats.begin(), iter2 = beat_type.begin(); (iter1 != beats.end()) && (iter2 != beat_type.end()); - ++iter1, ++iter2) { + ++iter1, ++iter2) { // Process current beat/beat-type combination and add it to the meterSigGrp MeterSig *meterSig = new MeterSig(); data_METERCOUNT_pair count = meterSig->AttMeterSigLog::StrToMetercountPair(iter1->node().text().as_string()); @@ -4739,8 +4739,8 @@ std::string MusicXmlInput::GetOrnamentGlyphNumber(int attributes) const static std::map precomposedNames = { { APPR_Above | FORM_Inverted, "U+E5C6" }, { APPR_Below | FORM_Inverted, "U+E5B5" }, { APPR_Above | FORM_Normal, "U+E5C7" }, { APPR_Below | FORM_Normal, "U+E5B8" }, - { FORM_Inverted | DEP_Above, "U+E5BB" }, { FORM_Inverted | DEP_Below, "U+E5C8" } - // these values need to be matched with proper SMuFL codes first + { FORM_Inverted | DEP_Above, "U+E5BB" }, + { FORM_Inverted | DEP_Below, "U+E5C8" } // these values need to be matched with proper SMuFL codes first /*, { FORM_Normal | DEP_Above, "U+????" }, { FORM_Normal | DEP_Below, "U+????" }, { APPR_Above | FORM_Normal | DEP_Above, "U+????" }, { APPR_Above | FORM_Normal | DEP_Above, "U+????" }, { APPR_Above | FORM_Normal | DEP_Below, "U+????" },