Specialization for others::StaffUsed that adds methods for processing the array as a whole.
More...
#include <MusxInstance.h>
|
| MusxInstance< others::Staff > | getStaffInstanceAtIndex (size_t index) const |
| | Returns the others::Staff instance (without any staff styles applied) at a specified index of iuArray or nullptr if not found.
|
| |
| MusxInstance< others::StaffComposite > | getStaffInstanceAtIndex (size_t index, MeasCmper measureId, Edu eduPosition=0) const |
| | Returns the current others::StaffComposite instance 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.
|
| |
|
StaffCmper | getTopStaffId () const |
| | Returns the top staff id or zero if none.
|
| |
|
StaffCmper | getBottomStaffId () const |
| | Returns the bottom staff id or zero if none.
|
| |
| bool | iterateEntries (size_t startIndex, size_t endIndex, const MusicRange &range, std::function< bool(const EntryInfoPtr &)> iterator) const |
| | Iterates all the entries that start within the input MusicRange. It iterates by staff and then measure. If an entry starts before the range, it is excluded even if its duration takes it within the range. Conversely, an entry is included if it starts within the range, even if its duration takes it outside the range. If startIndex is less than endIndex, the staves are iterated upwards. Otherwise they are interated downwards.
|
| |
|
| 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< Document > | getDocument () const |
| | Gets the document that was used to create this list.
|
| |
Specialization for others::StaffUsed that adds methods for processing the array as a whole.
◆ getIndexForStaff()
Returns the 0-based index of the StaffCmper or std::nullopt if not found.
- Parameters
-
◆ getStaffInstanceAtIndex() [1/2]
Returns the others::Staff instance (without any staff styles applied) at a specified index of iuArray or nullptr if not found.
- Parameters
-
| index | The 0-based index to find. |
◆ getStaffInstanceAtIndex() [2/2]
Returns the current others::StaffComposite instance at a specified index of iuArray or nullptr if not found.
- Parameters
-
| index | The 0-based index to find. |
| measureId | The measure of the location to get. |
| eduPosition | The edu position of the location to get. |
◆ iterateEntries()
Iterates all the entries that start within the input MusicRange. It iterates by staff and then measure. If an entry starts before the range, it is excluded even if its duration takes it within the range. Conversely, an entry is included if it starts within the range, even if its duration takes it outside the range. If startIndex is less than endIndex, the staves are iterated upwards. Otherwise they are interated downwards.
- Parameters
-
| startIndex | The first staff index to iterate. |
| endIndex | The last staff index to inerate. |
| range | The music range to iterate. It should be expressed in global position values. |
| iterator | The iterator function. Return false from this function to stop iterating. |
- Returns
- True if all items were iterated. False if the
iterator returned false and exited early.