26#include <unordered_map>
29#include "CommonClasses.h"
78 std::unordered_map<StaffCmper, size_t>
staves;
111 using typename std::unordered_map<StaffCmper, InstrumentInfo>::key_type;
112 using typename std::unordered_map<StaffCmper, InstrumentInfo>::mapped_type;
113 using typename std::unordered_map<StaffCmper, InstrumentInfo>::value_type;
114 using typename std::unordered_map<StaffCmper, InstrumentInfo>::hasher;
115 using typename std::unordered_map<StaffCmper, InstrumentInfo>::key_equal;
116 using typename std::unordered_map<StaffCmper, InstrumentInfo>::allocator_type;
117 using typename std::unordered_map<StaffCmper, InstrumentInfo>::size_type;
118 using typename std::unordered_map<StaffCmper, InstrumentInfo>::difference_type;
119 using typename std::unordered_map<StaffCmper, InstrumentInfo>::reference;
120 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_reference;
121 using typename std::unordered_map<StaffCmper, InstrumentInfo>::pointer;
122 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_pointer;
123 using typename std::unordered_map<StaffCmper, InstrumentInfo>::iterator;
124 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_iterator;
125 using typename std::unordered_map<StaffCmper, InstrumentInfo>::local_iterator;
126 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_local_iterator;
Base for DOM classes that belong to a Document.
Definition DocumentElement.h:46
Derived description of a logical instrument in a document.
Definition Instrument.h:48
std::vector< StaffCmper > getSequentialStaves() const
Returns the staffIds in sequence as they appear in Scroll View in the score.
Definition Instrument.cpp:73
Cmper multistaffGroupId
The others::MultiStaffInstrumentGroup that defines the instrument. (May be zero.)
Definition Instrument.h:80
std::vector< InstrumentIdentity > getInstrumentIdentities() const
Returns the unique instrument identities in order of first appearance.
Definition Instrument.cpp:150
std::map< MusicPoint, InstrumentChange > InstrumentChangeEvents
Effective top-staff states keyed by the musical location where each state begins.
Definition Instrument.h:70
InstrumentInfo(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID)
Constructs an empty instrument info for a score or linked part.
Definition Instrument.h:75
InstrumentChangeEvents getChanges() const
Returns effective instrument states for this logical instrument.
Definition Instrument.cpp:87
Cmper staffGroupId
The details::StaffGroup that visually represents the instrument. (May be zero.)
Definition Instrument.h:79
std::unordered_map< StaffCmper, size_t > staves
List of each staffId with its sequence index from top to bottom.
Definition Instrument.h:78
InstrumentIdentity getInstrumentIdentityAt(MusicPoint point) const
Returns the instrument identity in effect at the specified music point.
Definition Instrument.cpp:162
A list of instruments, which may be single- or multi-staff.
Definition Instrument.h:107
const InstrumentInfo * getInstrumentForStaff(StaffCmper staffId) const
Get the instrument info for the given staffId in the given map.
Definition Instrument.cpp:172
InstrumentMap(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID)
Constructs an empty instrument map for a score or linked part.
Definition Instrument.h:131
Utility class that represents a single location in musical time.
Definition CommonClasses.h:423
std::shared_ptr< const T > MusxInstance
Defines the type of a musx instance stored in a pool.
Definition MusxInstance.h:40
constexpr Cmper SCORE_PARTID
The part id of the score.
Definition Fundamentals.h:79
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:55
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition DocumentElement.h:37
int16_t StaffCmper
Enigma staff (staffId) Cmper (may be negative when not applicable)
Definition Fundamentals.h:65
object model for musx file (enigmaxml)
Definition BaseClasses.h:38
Effective instrument state beginning at a musical location.
Definition Instrument.h:64
InstrumentIdentity identity
Stable identity for the effective instrument.
Definition Instrument.h:65
MusxInstance< others::StaffComposite > topStaffComposite
Effective state of the top staff.
Definition Instrument.h:66
Stable identity for a distinct instrument used by this logical instrument.
Definition Instrument.h:51
std::string instUuid
The effective instrument UUID.
Definition Instrument.h:52
bool operator==(const InstrumentIdentity &other) const
Equality comparison operator.
Definition Instrument.h:55
bool operator<(const InstrumentIdentity &other) const
Ordering operator for use in ordered containers.
Definition Instrument.h:59