diff --git a/src/iomei.cpp b/src/iomei.cpp index 0b2d374506e..f99761a73b4 100644 --- a/src/iomei.cpp +++ b/src/iomei.cpp @@ -97,6 +97,7 @@ #include "num.h" #include "octave.h" #include "orig.h" +#include "oriscus.h" #include "ornam.h" #include "page.h" #include "pagemilestone.h" @@ -712,6 +713,10 @@ bool MEIOutput::WriteObjectInternal(Object *object, bool useCustomScoreDef) m_currentNode = m_currentNode.append_child("note"); this->WriteNote(m_currentNode, vrv_cast(object)); } + else if (object->Is(ORISCUS)) { + m_currentNode = m_currentNode.append_child("oriscus"); + this->WriteOriscus(m_currentNode, vrv_cast(object)); + } else if (object->Is(PLICA)) { m_currentNode = m_currentNode.append_child("plica"); this->WritePlica(m_currentNode, vrv_cast(object)); @@ -2754,6 +2759,15 @@ void MEIOutput::WriteNote(pugi::xml_node currentNode, Note *note) note->WriteVisibility(currentNode); } +void MEIOutput::WriteOriscus(pugi::xml_node currentNode, Oriscus *oriscus) +{ + assert(oriscus); + + this->WriteLayerElement(currentNode, oriscus); + this->WritePitchInterface(currentNode, oriscus); + oriscus->WriteColor(currentNode); +} + void MEIOutput::WritePlica(pugi::xml_node currentNode, Plica *plica) { assert(plica); @@ -3723,6 +3737,9 @@ bool MEIInput::IsAllowed(std::string element, Object *filterParent) if (element == "liquescent") { return true; } + else if (element == "oriscus") { + return true; + } else if (element == "quilisma") { return true; } @@ -6273,6 +6290,9 @@ bool MEIInput::ReadLayerChildren(Object *parent, pugi::xml_node parentNode, Obje else if (elementName == "note") { success = this->ReadNote(parent, xmlElement); } + else if (elementName == "oriscus") { + success = this->ReadOriscus(parent, xmlElement); + } else if (elementName == "quilisma") { success = this->ReadQuilisma(parent, xmlElement); } @@ -6979,6 +6999,20 @@ bool MEIInput::ReadProport(Object *parent, pugi::xml_node proport) return true; } +bool MEIInput::ReadOriscus(Object *parent, pugi::xml_node oriscus) +{ + Oriscus *vrvOriscus = new Oriscus(); + this->ReadLayerElement(oriscus, vrvOriscus); + this->ReadPositionInterface(oriscus, vrvOriscus); + + vrvOriscus->ReadColor(oriscus); + + parent->AddChild(vrvOriscus); + this->ReadUnsupportedAttr(oriscus, vrvOriscus); + + return true; +} + bool MEIInput::ReadQuilisma(Object *parent, pugi::xml_node quilisma) { Quilisma *vrvQuilisma = new Quilisma();