Skip to content

Commit

Permalink
[engraving] added 410 read implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkorsukov committed May 31, 2023
1 parent 87ea144 commit 6f6446b
Show file tree
Hide file tree
Showing 23 changed files with 7,924 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/engraving/CMakeLists.txt
Expand Up @@ -60,6 +60,7 @@ set(MODULE_SRC

${LIBMSCORE_SRC}

${CMAKE_CURRENT_LIST_DIR}/rw/README.h
${CMAKE_CURRENT_LIST_DIR}/rw/ireader.h
${CMAKE_CURRENT_LIST_DIR}/rw/iwriter.h
${CMAKE_CURRENT_LIST_DIR}/rw/rwregister.cpp
Expand Down Expand Up @@ -110,6 +111,19 @@ set(MODULE_SRC
${CMAKE_CURRENT_LIST_DIR}/rw/read400/connectorinforeader.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read400/connectorinforeader.h

${CMAKE_CURRENT_LIST_DIR}/rw/read410/read410.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read410/read410.h
${CMAKE_CURRENT_LIST_DIR}/rw/read410/staffread.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read410/staffread.h
${CMAKE_CURRENT_LIST_DIR}/rw/read410/measureread.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read410/measureread.h
${CMAKE_CURRENT_LIST_DIR}/rw/read410/readcontext.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read410/readcontext.h
${CMAKE_CURRENT_LIST_DIR}/rw/read410/tread.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read410/tread.h
${CMAKE_CURRENT_LIST_DIR}/rw/read410/connectorinforeader.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/read410/connectorinforeader.h

${CMAKE_CURRENT_LIST_DIR}/rw/compat/readstyle.cpp
${CMAKE_CURRENT_LIST_DIR}/rw/compat/readstyle.h
${CMAKE_CURRENT_LIST_DIR}/rw/compat/readchordlisthook.cpp
Expand Down
5 changes: 5 additions & 0 deletions src/engraving/libmscore/measure.h
Expand Up @@ -36,6 +36,10 @@ namespace mu::engraving::read400 {
class MeasureRead;
}

namespace mu::engraving::read410 {
class MeasureRead;
}

namespace mu::engraving::write {
class MeasureWrite;
}
Expand Down Expand Up @@ -380,6 +384,7 @@ class Measure final : public MeasureBase

friend class Factory;
friend class read400::MeasureRead;
friend class read410::MeasureRead;
friend class write::MeasureWrite;
friend class layout::v0::MeasureLayout;

Expand Down
7 changes: 5 additions & 2 deletions src/engraving/libmscore/score.h
Expand Up @@ -70,12 +70,14 @@ class Read302;

namespace mu::engraving::read400 {
class Read400;
class ReadContext;
}

namespace mu::engraving::read410 {
class Read410;
}

namespace mu::engraving::write {
class Writer;
class WriteContext;
}

namespace mu::engraving::compat {
Expand Down Expand Up @@ -391,6 +393,7 @@ class Score : public EngravingObject

friend class read302::Read302;
friend class read400::Read400;
friend class read410::Read410;
friend class write::Writer;
friend class layout::v0::ScoreLayout;

Expand Down
21 changes: 21 additions & 0 deletions src/engraving/rw/README.h
@@ -0,0 +1,21 @@
/**
There will be notes about read/write
1. Public / internal
The classes that are located in the root of the `rw` folder
and in the `rw` namespace are intended for use outside the read-write subsystem.
Classes that are located in subfolders (readXXX, write) are internal
and not intended for use outside the read-write subsystem.
2. Versions
Reading implementations of different versions of the format are located in different corresponding subfolders.
BUT! Version source code 114-400 can be used not only to read its version, but also others in this range,
i.e. its use is mixed between these versions, so its change should take this into keep in mind.
The source code of version 410 is copied from version 400 and is used only to read the format of version 410,
i.e. it can be refactored and changed without keep in mind previous versions,
we can (or even need to) remove backward compatibility from it.
*/
2 changes: 1 addition & 1 deletion src/engraving/rw/read114/read114.cpp
Expand Up @@ -3173,7 +3173,7 @@ bool Read114::pasteStaff(XmlReader&, Segment*, staff_idx_t, Fraction)
UNREACHABLE;
}

void Read114::pasteSymbols(XmlReader& e, ChordRest* dst)
void Read114::pasteSymbols(XmlReader&, ChordRest*)
{
UNREACHABLE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/engraving/rw/read206/read206.cpp
Expand Up @@ -3466,7 +3466,7 @@ bool Read206::pasteStaff(XmlReader&, Segment*, staff_idx_t, Fraction)
UNREACHABLE;
}

void Read206::pasteSymbols(XmlReader& e, ChordRest* dst)
void Read206::pasteSymbols(XmlReader&, ChordRest*)
{
UNREACHABLE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/engraving/rw/read302/read302.cpp
Expand Up @@ -330,7 +330,7 @@ bool Read302::pasteStaff(XmlReader&, Segment*, staff_idx_t, Fraction)
UNREACHABLE;
}

void Read302::pasteSymbols(XmlReader& e, ChordRest* dst)
void Read302::pasteSymbols(XmlReader&, ChordRest*)
{
UNREACHABLE;
}
Expand Down

0 comments on commit 6f6446b

Please sign in to comment.