forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 13
/
score.h
30 lines (22 loc) · 696 Bytes
/
score.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef MAIN_SCORE_H
#define MAIN_SCORE_H
#include "engraving/libmscore/masterscore.h"
#include "engraving/libmscore/excerpt.h"
using namespace mu;
struct MainScore {
public:
MainScore(uintptr_t score_ptr, int excerptId = -1) {
auto _score = reinterpret_cast<engraving::MasterScore*>(score_ptr);
score = maybeUseExcerpt(_score, excerptId);
}
inline operator engraving::MasterScore*() {
return score;
}
inline engraving::MasterScore* operator->() {
return score;
}
private:
engraving::MasterScore* score;
static engraving::MasterScore* maybeUseExcerpt(engraving::MasterScore* score, int excerptId);
};
#endif // MAIN_SCORE_H