wavelength 1.0.0
Loading...
Searching...
No Matches
sectionboundaries.h
Go to the documentation of this file.
1#pragma once
2
3#include <utility>
4#include <vector>
5
13public:
14 SectionBoundaries() = default;
15
21 explicit SectionBoundaries(std::vector<int> ends) : mEnds(std::move(ends)) {
22 }
23
31 int NumSections() const;
32
41 bool IsPastEnd(int nMeasure) const;
42
51 int SectionStart(int nSection) const;
52
61 int SectionEnd(int nSection) const;
62
72 void GetSectionRange(int nSection, int *pStart, int *pEnd) const;
73
82 int SectionAt(int nMeasure) const;
83
84private:
85 std::vector<int> mEnds;
86};
int SectionAt(int nMeasure) const
Report the section a measure lies in.
int SectionEnd(int nSection) const
Report the measure at which a section ends.
int SectionStart(int nSection) const
Report the measure at which a section starts.
void GetSectionRange(int nSection, int *pStart, int *pEnd) const
Report the measures a section spans.
SectionBoundaries(std::vector< int > ends)
Construct the list from the end measures.
Definition sectionboundaries.h:21
bool IsPastEnd(int nMeasure) const
Report whether a measure lies at or after the end of the last section.
int NumSections() const
Report the number of sections.
SectionBoundaries()=default