MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::MusxInstanceList< others::StaffUsed > Class Reference

Specialization for others::StaffUsed that adds methods for processing the array as a whole. More...

#include <MusxInstance.h>

+ Inheritance diagram for musx::dom::MusxInstanceList< others::StaffUsed >:

Public Member Functions

MusxInstance< others::StaffgetStaffInstanceAtIndex (Cmper index) const
 Returns the others::Staff instance (without any staff styles applied) at a specified index of iuArray or nullptr if not found.
 
std::optional< size_t > getIndexForStaff (StaffCmper staffId) const
 Returns the 0-based index of the StaffCmper or std::nullopt if not found.
 
- Public Member Functions inherited from musx::dom::MusxInstanceListBase< others::StaffUsed >
 MusxInstanceListBase (const std::weak_ptr< Document > &document, Cmper partId)
 Default constructor.
 
Cmper getRequestedPartId () const
 Gets the part id that was used to create this list.
 
std::shared_ptr< DocumentgetDocument () const
 Gets the document that was used to create this list.
 

Detailed Description

Specialization for others::StaffUsed that adds methods for processing the array as a whole.

Member Function Documentation

◆ getIndexForStaff()

std::optional< size_t > musx::dom::MusxInstanceList< others::StaffUsed >::getIndexForStaff ( StaffCmper  staffId) const

Returns the 0-based index of the StaffCmper or std::nullopt if not found.

Parameters
staffIdThe others::Staff cmper value to find.

◆ getStaffInstanceAtIndex()

MusxInstance< others::Staff > musx::dom::MusxInstanceList< others::StaffUsed >::getStaffInstanceAtIndex ( Cmper  index) const

Returns the others::Staff instance (without any staff styles applied) at a specified index of iuArray or nullptr if not found.

Parameters
indexThe 0-based index to find.