wavelength 1.0.0
Loading...
Searching...
No Matches
SectionBoundaries Class Reference

Ascending list of the measures at which the sections of a song end. More...

#include <sectionboundaries.h>

Public Member Functions

 SectionBoundaries ()=default
 SectionBoundaries (std::vector< int > ends)
 Construct the list from the end measures.
int NumSections () const
 Report the number of sections.
bool IsPastEnd (int nMeasure) const
 Report whether a measure lies at or after the end of the last section.
int SectionStart (int nSection) const
 Report the measure at which a section starts.
int SectionEnd (int nSection) const
 Report the measure at which a section ends.
void GetSectionRange (int nSection, int *pStart, int *pEnd) const
 Report the measures a section spans.
int SectionAt (int nMeasure) const
 Report the section a measure lies in.

Detailed Description

Ascending list of the measures at which the sections of a song end.

Section 0 starts at measure 0, and every later section starts where the one before it ends. The class is not polymorphic and has no RTTI. The name is inferred.

Constructor & Destructor Documentation

◆ SectionBoundaries() [1/2]

SectionBoundaries::SectionBoundaries ( )
default

◆ SectionBoundaries() [2/2]

SectionBoundaries::SectionBoundaries ( std::vector< int > ends)
inlineexplicit

Construct the list from the end measures.

Parameters
endsThe end measure of each section, ascending.

Member Function Documentation

◆ NumSections()

int SectionBoundaries::NumSections ( ) const

Report the number of sections.

Returns
The number of sections.
Ghidra address:
NTSC-U/C: 0x00137430
Ghidra address:
PAL: 0x00138c90

◆ IsPastEnd()

bool SectionBoundaries::IsPastEnd ( int nMeasure) const

Report whether a measure lies at or after the end of the last section.

Parameters
nMeasureThe measure.
Returns
True when the measure is past the last section.
Ghidra address:
NTSC-U/C: 0x00137448
Ghidra address:
PAL: 0x00138ca8

◆ SectionStart()

int SectionBoundaries::SectionStart ( int nSection) const

Report the measure at which a section starts.

Parameters
nSectionThe section.
Returns
The first measure of the section.
Ghidra address:
NTSC-U/C: 0x00137460
Ghidra address:
PAL: 0x00138cc0

◆ SectionEnd()

int SectionBoundaries::SectionEnd ( int nSection) const

Report the measure at which a section ends.

Parameters
nSectionThe section.
Returns
The first measure after the section.
Ghidra address:
NTSC-U/C: 0x00137490
Ghidra address:
PAL: 0x00138cf0

◆ GetSectionRange()

void SectionBoundaries::GetSectionRange ( int nSection,
int * pStart,
int * pEnd ) const

Report the measures a section spans.

Parameters
nSectionThe section.
pStartReceives the first measure of the section.
pEndReceives the first measure after the section.
Ghidra address:
NTSC-U/C: 0x001374a8
Ghidra address:
PAL: 0x00138d08

◆ SectionAt()

int SectionBoundaries::SectionAt ( int nMeasure) const

Report the section a measure lies in.

Parameters
nMeasureThe measure.
Returns
The section, which equals NumSections() past the last section.
Ghidra address:
NTSC-U/C: 0x001374f0
Ghidra address:
PAL: 0x00138d50

The documentation for this class was generated from the following file: