Skip to content

Commit

Permalink
r/w oriscus
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed May 27, 2024
1 parent 0dade7c commit b7be7ba
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/iomei.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -712,6 +713,10 @@ bool MEIOutput::WriteObjectInternal(Object *object, bool useCustomScoreDef)
m_currentNode = m_currentNode.append_child("note");
this->WriteNote(m_currentNode, vrv_cast<Note *>(object));
}
else if (object->Is(ORISCUS)) {
m_currentNode = m_currentNode.append_child("oriscus");
this->WriteOriscus(m_currentNode, vrv_cast<Oriscus *>(object));
}
else if (object->Is(PLICA)) {
m_currentNode = m_currentNode.append_child("plica");
this->WritePlica(m_currentNode, vrv_cast<Plica *>(object));
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit b7be7ba

Please sign in to comment.