Line data Source code
1 : /*
2 : * SPDX-License-Identifier: GPL-3.0-only
3 : * MuseScore-Studio-CLA-applies
4 : *
5 : * MuseScore Studio
6 : * Music Composition & Notation
7 : *
8 : * Copyright (C) 2021 MuseScore Limited and others
9 : *
10 : * This program is free software: you can redistribute it and/or modify
11 : * it under the terms of the GNU General Public License version 3 as
12 : * published by the Free Software Foundation.
13 : *
14 : * This program is distributed in the hope that it will be useful,
15 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 : * GNU General Public License for more details.
18 : *
19 : * You should have received a copy of the GNU General Public License
20 : * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 : */
22 :
23 : #ifndef MU_ENGRAVING_INOUTDATA_H
24 : #define MU_ENGRAVING_INOUTDATA_H
25 :
26 : #include <map>
27 : #include <vector>
28 : #include <optional>
29 :
30 : #include "linksindexer.h"
31 :
32 : #include "write/writecontext.h"
33 :
34 : namespace mu::engraving {
35 : class LinkedObjects;
36 : }
37 :
38 : namespace mu::engraving::rw {
39 : struct ReadLinks
40 : {
41 : std::map<int /*staffIndex*/, std::vector<std::pair<LinkedObjects*, Location> > > staffLinkedElements; // one list per staff
42 : LinksIndexer linksIndexer;
43 : };
44 :
45 : struct ReadInOutData {
46 : // for master - out
47 : // for except - in
48 : ReadLinks links;
49 : std::optional<double> overriddenSpatium = std::nullopt;
50 : PropertyIdSet propertiesToSkip;
51 : bool forcePageMode = false;
52 :
53 : // out
54 : SettingsCompat settingsCompat;
55 : std::optional<double> originalSpatium = std::nullopt;
56 : };
57 :
58 : struct WriteInOutData {
59 : write::WriteContext ctx;
60 3 : WriteInOutData(const Score* s)
61 3 : : ctx(s) {}
62 : };
63 : }
64 :
65 : #endif // MU_ENGRAVING_INOUTDATA_H
|