MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::details::StaffGroupInfo Class Reference

Provides run-time information about Staff Groups within a system or list of others::StaffUsed. More...

#include <Details.h>

Public Member Functions

 StaffGroupInfo (const MusxInstance< StaffGroup > &staffGroup, const MusxInstanceList< others::StaffUsed > &inpSysStaves)
 Constructs information about a specific StaffGroup as it relates the the systemStaves.
 
std::optional< size_t > numStaves () const
 The number of staves in the group for the systemStaves.
 
void iterateStaves (MeasCmper measId, Edu eduPosition, std::function< bool(const MusxInstance< others::StaffComposite > &)> iterator) const
 Iterates the staves in the group in order according to systemStaves.
 
bool calcIsSingleInstrumentSection (MeasCmper measureId) const
 Returns true if this staff group spans multiple staves with the same exact instrument UUID, excluding groups that represent one logical instrument in the document's instrument map.
 

Static Public Member Functions

static std::vector< StaffGroupInfogetGroupsAtMeasure (MeasCmper measureId, Cmper linkedPartId, const MusxInstanceList< others::StaffUsed > &systemStaves)
 Creates a vector of StaffGroupInfo instances for the measure, part, and system staves.
 

Public Attributes

std::optional< size_t > startSlot
 the 0-based start slot (index) of the group in the system staves.
 
std::optional< size_t > endSlot
 the 0-based end slot (index) of the group in the system staves.
 
MusxInstance< StaffGroupgroup
 the StaffGroup record for the group.
 
MusxInstanceList< others::StaffUsedsystemStaves
 the system staves referred to by startSlot and endSlot
 

Detailed Description

Provides run-time information about Staff Groups within a system or list of others::StaffUsed.

Constructor & Destructor Documentation

◆ StaffGroupInfo()

musx::dom::details::StaffGroupInfo::StaffGroupInfo ( const MusxInstance< StaffGroup > &  staffGroup,
const MusxInstanceList< others::StaffUsed > &  inpSysStaves 
)

Constructs information about a specific StaffGroup as it relates the the systemStaves.

Parameters
staffGroupThe staff group
inpSysStavesThe others::StaffUsed list for a system or Scroll view.

Member Function Documentation

◆ calcIsSingleInstrumentSection()

bool musx::dom::details::StaffGroupInfo::calcIsSingleInstrumentSection ( MeasCmper  measureId) const

Returns true if this staff group spans multiple staves with the same exact instrument UUID, excluding groups that represent one logical instrument in the document's instrument map.

Parameters
measureIdThe measure for which to evaluate staff styles and group membership.

◆ getGroupsAtMeasure()

std::vector< StaffGroupInfo > musx::dom::details::StaffGroupInfo::getGroupsAtMeasure ( MeasCmper  measureId,
Cmper  linkedPartId,
const MusxInstanceList< others::StaffUsed > &  systemStaves 
)
static

Creates a vector of StaffGroupInfo instances for the measure, part, and system staves.

Parameters
measureIdThe measure to find.
linkedPartIdThe ID of the linked part in which to find the groups.
systemStavesThe others::StaffUsed list for a system or Scroll view.

◆ iterateStaves()

void musx::dom::details::StaffGroupInfo::iterateStaves ( MeasCmper  measId,
Edu  eduPosition,
std::function< bool(const MusxInstance< others::StaffComposite > &)>  iterator 
) const

Iterates the staves in the group in order according to systemStaves.

Parameters
measIdThe measure for which to construct each others::StaffComposite instance.
eduPositionThe Edu position for which to construct each others::StaffComposite instance.
iteratorThe iterator function. Returning false from this function terminates iteration.