MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::others::StaffListSet< ScoreList, PartsList, ScoreForcedList, PartsForcedList > Class Template Reference

Generic resolver for a family of staff lists. More...

#include <Others.h>

Public Member Functions

 StaffListSet (const DocumentPtr &document, Cmper partId, Cmper staffListId) noexcept
 Constructor function.
 
bool contains (StaffCmper staffId, const MusxInstanceList< StaffUsed > &systemStaves, bool isHidden=false) const noexcept
 Returns true is the staff list includes a particular staff on a particular system.
 

Detailed Description

template<class ScoreList, class PartsList, class ScoreForcedList = void, class PartsForcedList = void>
class musx::dom::others::StaffListSet< ScoreList, PartsList, ScoreForcedList, PartsForcedList >

Generic resolver for a family of staff lists.

Template Parameters
ScoreListlist class used for score
PartsListlist class used for parts
ScoreForcedList(optional) forced list class for score
PartsForcedList(optional) forced list class for parts

Member Function Documentation

◆ contains()

template<class ScoreList , class PartsList , class ScoreForcedList , class PartsForcedList >
bool musx::dom::others::StaffListSet< ScoreList, PartsList, ScoreForcedList, PartsForcedList >::contains ( StaffCmper  staffId,
const MusxInstanceList< StaffUsed > &  systemStaves,
bool  isHidden = false 
) const
noexcept

Returns true is the staff list includes a particular staff on a particular system.

Parameters
staffIdThe StaffCmper to check.
systemStavesThe staves for a particular system (or BASE_SYSTEM_ID).
isHiddenIf true, only the forced staff list is checked. Normally you will omit this for categories or pass Staff::hideRepeats for repeats.
Todo:
It may be necessary to add some fuzzy logic around StaffGroup here, at least for category staff lists. Finale includes a staff if it is the top staff in a group, when the top staff of a group is included. We defer this to another day.