8 #ifndef __VRV_IOABC_H__
9 #define __VRV_IOABC_H__
17 #include "pugixml.hpp"
50 bool Import(
const std::string &abc)
override;
52 #ifndef NO_ABC_SUPPORT
57 void ParseABC(std::istream &infile);
60 int SetBarLine(
const std::string &musicCode,
int index);
61 void CalcUnitNoteLength();
62 void AddAnnot(
const std::string &remark);
63 void AddLayerElement();
67 int ParseTuplet(
const std::string &musicCode,
int index);
70 void parseInstruction(
const std::string &keyString);
71 void parseKey(std::string &keyString);
72 void parseUnitNoteLength(
const std::string &unitNoteLength);
73 void parseMeter(
const std::string &meterString);
74 void parseTempo(
const std::string &tempoString);
75 void parseReferenceNumber(
const std::string &referenceNumberString);
79 void readInformationField(
const char &dataKey, std::string dataValue);
80 void readMusicCode(
const std::string &musicCode,
Section *section);
83 void parseDecoration(
const std::string &decorationString);
91 void PrintInformationFields(
Score *score);
93 void CreateWorkEntry();
94 void FlushControlElements(
Score *score,
Section *section);
95 void InitScoreAndSection(
Score *&score,
Section *§ion);
97 #endif // NO_ABC_SUPPORT
102 enum class ElementType { Default,
Tuplet };
103 struct ContainerElement {
104 ElementType m_type = ElementType::Default;
109 std::string m_filename;
114 Layer *m_layer = NULL;
116 data_DURATION m_durDefault;
119 std::pair<data_BARRENDITION, data_BARRENDITION> m_barLines
120 = std::make_pair(BARRENDITION_NONE, BARRENDITION_NONE);
124 char m_decoration =
'!';
125 char m_linebreak =
'$';
128 int m_gracecount = 0;
129 int m_stafflines = 5;
131 ContainerElement m_containerElement;
135 std::vector<std::pair<std::string, int>> m_composer;
136 std::vector<std::pair<std::string, int>> m_history;
137 std::vector<std::pair<std::string, int>> m_notes;
138 std::vector<std::pair<std::string, int>> m_origin;
139 std::vector<std::pair<std::string, int>> m_title;
140 std::vector<std::pair<std::pair<std::string, int>,
char>> m_info;
142 std::vector<ControlElement *> m_tempoStack;
143 std::vector<Harm *> m_harmStack;
144 std::vector<Slur *> m_slurStack;
145 std::vector<Tie *> m_tieStack;
147 std::vector<LayerElement *> m_layerElements;
148 std::vector<LayerElement *> m_noteStack;
150 std::vector<LayerElement *> m_lineNoteArray;
151 int m_verseNumber = 1;
155 std::vector<data_ARTICULATION> m_artic;
156 std::vector<std::string> m_dynam;
158 data_STAFFREL m_fermata = STAFFREL_NONE;
162 std::vector<std::pair<std::string, ControlElement *>> m_controlElements;
166 pugi::xml_node m_workList;