Skip to content

Commit

Permalink
Merge pull request #24699 from miiizen/xml-refactor
Browse files Browse the repository at this point in the history
XML refactoring
  • Loading branch information
miiizen authored Oct 3, 2024
2 parents 4f64230 + ed4436d commit 8fc4bbb
Show file tree
Hide file tree
Showing 31 changed files with 1,300 additions and 1,289 deletions.
5 changes: 1 addition & 4 deletions src/importexport/musicxml/imusicxmlconfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef MU_IMPORTEXPORT_IMUSICXMLCONFIGURATION_H
#define MU_IMPORTEXPORT_IMUSICXMLCONFIGURATION_H
#pragma once

#include "modularity/imoduleinterface.h"
#include "io/path.h"
Expand Down Expand Up @@ -67,5 +66,3 @@ class IMusicXmlConfiguration : MODULE_EXPORT_INTERFACE
virtual void setInferTextTypeOverride(std::optional<bool> value) = 0;
};
}

#endif // MU_IMPORTEXPORT_IMUSICXMLCONFIGURATION_H
4 changes: 3 additions & 1 deletion src/importexport/musicxml/internal/musicxml/exportxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@
#include "engraving/dom/volta.h"
#include "engraving/dom/whammybar.h"

#include "musicxml.h"
#include "musicxmlfonthandler.h"
#include "musicxmlsupport.h"
#include "musicxmltypes.h"

#include "modularity/ioc.h"
#include "../../imusicxmlconfiguration.h"
Expand Down Expand Up @@ -157,6 +157,8 @@ namespace mu::engraving {
#define clefDebug(...) {}
#endif

constexpr int MAX_PART_GROUPS = 8;

//---------------------------------------------------------
// typedefs
//---------------------------------------------------------
Expand Down
6 changes: 1 addition & 5 deletions src/importexport/musicxml/internal/musicxml/exportxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef MU_IMPORTEXPORT_EXPORTXML_H
#define MU_IMPORTEXPORT_EXPORTXML_H
#pragma once

#include "io/iodevice.h"
#include "global/types/string.h"

namespace mu::engraving {
class Score;

bool saveMxl(Score*, muse::io::IODevice*);
bool saveXml(Score*, muse::io::IODevice*);
bool saveXml(Score*, const muse::String&);
}

#endif // MU_IMPORTEXPORT_EXPORTXML_H
5 changes: 1 addition & 4 deletions src/importexport/musicxml/internal/musicxml/importmxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef __IMPORTMXML_H__
#define __IMPORTMXML_H__
#pragma once

#include "global/types/string.h"
#include "engravingerrors.h"
Expand All @@ -31,5 +30,3 @@ class Score;

Err importMusicXMLfromBuffer(Score* score, const muse::String&, const muse::ByteArray& data);
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef __IMPORTMXMLLOGGER_H__
#define __IMPORTMXMLLOGGER_H__
#pragma once

#include "global/types/string.h"

Expand All @@ -45,5 +44,3 @@ class MxmlLogger
Level m_level = Level::MXML_INFO;
};
} // namespace Ms

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef __IMPORTMXMLNOTEDURATION_H__
#define __IMPORTMXMLNOTEDURATION_H__
#pragma once

#include "engraving/dom/durationtype.h"
#include "engraving/types/fraction.h"
Expand Down Expand Up @@ -66,5 +65,3 @@ class MxmlNoteDuration
MxmlLogger* m_logger = nullptr; ///< Error logger
};
} // namespace Ms

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef __IMPORTMXMLNOTEPITCH_H__
#define __IMPORTMXMLNOTEPITCH_H__
#pragma once

#include "global/serialization/xmlstreamreader.h"
#include "engraving/dom/accidental.h"
Expand Down Expand Up @@ -69,5 +68,3 @@ class MxmlNotePitch
MxmlLogger* m_logger = nullptr; // Error logger
};
} // namespace Ms

#endif
Loading

0 comments on commit 8fc4bbb

Please sign in to comment.