|
MUSX Document Model
|
Utility class that represents a single location in musical time. More...
#include <CommonClasses.h>
Public Member Functions | |
| constexpr | MusicPoint ()=default |
| Constructs a MusicPoint at measure 1, position 0. | |
| constexpr | MusicPoint (MeasCmper measId, util::Fraction pos) |
| Constructs a MusicPoint object. | |
| constexpr bool | operator== (const MusicPoint &other) const |
| Equality comparison operator. | |
| constexpr bool | operator!= (const MusicPoint &other) const |
| Inequality comparison operator. | |
| constexpr bool | operator< (const MusicPoint &other) const |
| Less-than comparison operator. | |
| constexpr bool | operator<= (const MusicPoint &other) const |
| Less-than-or-equal-to comparison operator. | |
| constexpr bool | operator> (const MusicPoint &other) const |
| Greater-than comparison operator. | |
| constexpr bool | operator>= (const MusicPoint &other) const |
| Greater-than-or-equal-to comparison operator. | |
Public Attributes | |
| MeasCmper | measureId {1} |
| Measure ID of the point. | |
| util::Fraction | position {} |
| Position within the measure, where 1/4 is a quarter note value. | |
Utility class that represents a single location in musical time.
This class is used to specify a point in musical time using a measure and a util::Fraction position within that measure. The position is expressed as a fraction of a whole note, so 1/4 is a quarter-note position.
The class is agnostic as to whether the position is a global- or staff-position value. The consuming code makes this determination.
|
inlineconstexpr |
Constructs a MusicPoint object.
| measId | The measure ID. |
| pos | The position within the measure. |
|
inlineconstexpr |
Inequality comparison operator.
| other | The other point to compare. |
|
inlineconstexpr |
Less-than comparison operator.
| other | The other point to compare. |
other.
|
inlineconstexpr |
Less-than-or-equal-to comparison operator.
| other | The other point to compare. |
other.
|
inlineconstexpr |
Equality comparison operator.
| other | The other point to compare. |
|
inlineconstexpr |
Greater-than comparison operator.
| other | The other point to compare. |
other.
|
inlineconstexpr |
Greater-than-or-equal-to comparison operator.
| other | The other point to compare. |
other.