27#include <unordered_map>
30#include "CommonClasses.h"
102 std::unordered_map<StaffCmper, size_t>
staves;
135 using typename std::unordered_map<StaffCmper, InstrumentInfo>::key_type;
136 using typename std::unordered_map<StaffCmper, InstrumentInfo>::mapped_type;
137 using typename std::unordered_map<StaffCmper, InstrumentInfo>::value_type;
138 using typename std::unordered_map<StaffCmper, InstrumentInfo>::hasher;
139 using typename std::unordered_map<StaffCmper, InstrumentInfo>::key_equal;
140 using typename std::unordered_map<StaffCmper, InstrumentInfo>::allocator_type;
141 using typename std::unordered_map<StaffCmper, InstrumentInfo>::size_type;
142 using typename std::unordered_map<StaffCmper, InstrumentInfo>::difference_type;
143 using typename std::unordered_map<StaffCmper, InstrumentInfo>::reference;
144 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_reference;
145 using typename std::unordered_map<StaffCmper, InstrumentInfo>::pointer;
146 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_pointer;
147 using typename std::unordered_map<StaffCmper, InstrumentInfo>::iterator;
148 using typename std::unordered_map<StaffCmper, InstrumentInfo>::const_iterator;
149 using typename std::unordered_map<StaffCmper, InstrumentInfo>::local_iterator;
150 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:72
std::vector< StaffCmper > getSequentialStaves() const
Returns the staffIds in sequence as they appear in Scroll View in the score.
Definition Instrument.cpp:878
Cmper multistaffGroupId
The others::MultiStaffInstrumentGroup that defines the instrument. (May be zero.)
Definition Instrument.h:104
std::vector< InstrumentIdentity > getInstrumentIdentities() const
Returns the unique instrument identities in order of first appearance.
Definition Instrument.cpp:955
std::map< MusicPoint, InstrumentChange > InstrumentChangeEvents
Effective top-staff states keyed by the musical location where each state begins.
Definition Instrument.h:94
InstrumentInfo(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID)
Constructs an empty instrument info for a score or linked part.
Definition Instrument.h:99
InstrumentChangeEvents getChanges() const
Returns effective instrument states for this logical instrument.
Definition Instrument.cpp:892
Cmper staffGroupId
The details::StaffGroup that visually represents the instrument. (May be zero.)
Definition Instrument.h:103
std::unordered_map< StaffCmper, size_t > staves
List of each staffId with its sequence index from top to bottom.
Definition Instrument.h:102
InstrumentIdentity getInstrumentIdentityAt(MusicPoint point) const
Returns the instrument identity in effect at the specified music point.
Definition Instrument.cpp:967
A list of instruments, which may be single- or multi-staff.
Definition Instrument.h:131
const InstrumentInfo * getInstrumentForStaff(StaffCmper staffId) const
Get the instrument info for the given staffId in the given map.
Definition Instrument.cpp:977
InstrumentMap(const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID)
Constructs an empty instrument map for a score or linked part.
Definition Instrument.h:155
Utility class that represents a single location in musical time.
Definition CommonClasses.h:435
@ Unspecified
contour is automatic, indeterminate, or does not apply
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:81
InstrumentFamily
Broad source-domain family for a Finale instrument UUID.
Definition Instrument.h:44
std::string_view InstrumentUuid
Lightweight view of a Finale instrument UUID value.
Definition Instrument.h:40
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:57
@ Percussion
Percussion clef, open rectangle (no pitch).
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition DocumentElement.h:37
InstrumentFamily instrumentFamilyFromUuid(InstrumentUuid uuid)
Returns the broad source-domain family for a Finale instrument UUID.
Definition Instrument.cpp:871
int16_t StaffCmper
Enigma staff (staffId) Cmper (may be negative when not applicable)
Definition Fundamentals.h:67
object model for musx file (enigmaxml)
Definition BaseClasses.h:38
Effective instrument state beginning at a musical location.
Definition Instrument.h:88
InstrumentIdentity identity
Stable identity for the effective instrument.
Definition Instrument.h:89
MusxInstance< others::StaffComposite > topStaffComposite
Effective state of the top staff.
Definition Instrument.h:90
Stable identity for a distinct instrument used by this logical instrument.
Definition Instrument.h:75
std::string instUuid
The effective instrument UUID.
Definition Instrument.h:76
bool operator==(const InstrumentIdentity &other) const
Equality comparison operator.
Definition Instrument.h:79
bool operator<(const InstrumentIdentity &other) const
Ordering operator for use in ordered containers.
Definition Instrument.h:83