|
MUSX Document Model
|
Derived description of a logical instrument in a document. More...
#include <Instrument.h>
Inheritance diagram for musx::dom::InstrumentInfo:Classes | |
| struct | InstrumentChange |
| Effective instrument state beginning at a musical location. More... | |
| struct | InstrumentIdentity |
| Stable identity for a distinct instrument used by this logical instrument. More... | |
Public Types | |
| using | InstrumentChangeEvents = std::map< MusicPoint, InstrumentChange > |
| Effective top-staff states keyed by the musical location where each state begins. | |
Public Member Functions | |
| InstrumentInfo (const DocumentWeakPtr &document, Cmper partId=SCORE_PARTID) | |
| Constructs an empty instrument info for a score or linked part. | |
| std::vector< StaffCmper > | getSequentialStaves () const |
| Returns the staffIds in sequence as they appear in Scroll View in the score. | |
| InstrumentChangeEvents | getChanges () const |
| Returns effective instrument states for this logical instrument. | |
| std::vector< InstrumentIdentity > | getInstrumentIdentities () const |
| Returns the unique instrument identities in order of first appearance. | |
| InstrumentIdentity | getInstrumentIdentityAt (MusicPoint point) const |
| Returns the instrument identity in effect at the specified music point. | |
Public Member Functions inherited from musx::dom::DocumentElement | |
| virtual | ~DocumentElement () noexcept(false)=default |
| Virtual destructor for polymorphic behavior. | |
| DocumentPtr | getDocument () const |
| Gets a reference to the Document. | |
| Cmper | getPartId () const |
| Gets the part id associated with this instance. | |
Public Attributes | |
| std::unordered_map< StaffCmper, size_t > | staves |
| List of each staffId with its sequence index from top to bottom. | |
| Cmper | staffGroupId {} |
| The details::StaffGroup that visually represents the instrument. (May be zero.) | |
| Cmper | multistaffGroupId {} |
| The others::MultiStaffInstrumentGroup that defines the instrument. (May be zero.) | |
Additional Inherited Members | |
Protected Member Functions inherited from musx::dom::DocumentElement | |
| DocumentElement (const DocumentWeakPtr &document, Cmper partId) | |
| Constructs the document element. | |
| DocumentElement (const DocumentElement &)=default | |
| explicit default copy constructor | |
| DocumentElement (DocumentElement &&) noexcept=default | |
| explicit default move constructor | |
| DocumentElement & | operator= (const DocumentElement &) |
| no-op copy assignment operator allows subclasses to copy their values. | |
| DocumentElement & | operator= (DocumentElement &&) noexcept |
| no-op move assignment operator allows subclasses to move their values. | |
Derived description of a logical instrument in a document.
This is not a Finale data class and is not populated directly from EnigmaXML. It is a normalized, interchange-oriented view calculated from Finale staves, staff groups, and multistaff instrument groups.
|
inlineexplicit |
Constructs an empty instrument info for a score or linked part.
| document | The document this instrument belongs to. |
| partId | The score or linked part ID represented by this instrument. |
| InstrumentInfo::InstrumentChangeEvents musx::dom::InstrumentInfo::getChanges | ( | ) | const |
Returns effective instrument states for this logical instrument.
Instrument changes are recognized only when every staff in the logical instrument has an aligned others::StaffStyleAssign whose others::StaffStyle::containsInstrumentChange returns true. Reversion to the base staff instrument is represented by an additional change at the first location after the staff style assignment. If no changes are found, the result contains one change at the start of the document.
| InstrumentInfo::InstrumentIdentity musx::dom::InstrumentInfo::getInstrumentIdentityAt | ( | MusicPoint | point | ) | const |
Returns the instrument identity in effect at the specified music point.
| std::logic_error | if no identity is in effect at point. |