|
MUSX Document Model
|
Represents an endpoint of the smart shape. More...
#include <SmartShape.h>
Inheritance diagram for musx::dom::smartshape::EndPoint:Public Member Functions | |
| StaffCmper | calcStaff () const |
| Calculates the staff the endpoint is on. | |
| MeasCmper | calcMeasure () const |
| Calculates the measure the endpoint is in. | |
| bool | calcIsValid () const |
| Finale can leave dead smart shapes around. This function calculates if the endpoint's entry, if any, exists and that the endpoint measure (see calcMeasure) exists in the document. | |
| util::Fraction | calcPosition () const |
| Calculates the staff-level position of the endpoint within its measure, based on whether it is measure- or entry-attached. | |
| util::Fraction | calcGlobalPosition () const |
| Calculates the global position of the endpoint within its measure, based on whether it is measure- or entry-attached. | |
| int | compareMetricPosition (const EndPoint &other) const |
| Compares the metric position of two endpoints. | |
| EntryInfoPtr | calcAssociatedEntry (bool findExact=false) const |
| Calculates the entry associated with the endpoint. | |
| MusxInstance< others::SmartShapeMeasureAssign > | getMeasureAssignment () const |
| Gets the measure assignment for this endpoint or null if none. | |
| MusxInstance< details::SmartShapeEntryAssign > | getEntryAssignment () const |
| Gets the entry assignment for this endpoint or null if none. Always null for measure-assigned endpoints. | |
| bool | calcIsAssigned () const |
| Return true if this endpoint is properly assigned to its measure and to its entry (for entry-attached endpoints). | |
| MusxInstance< others::StaffComposite > | createCurrentStaff () const |
| Return true if this endpoint is properly assigned to its measure and to its entry (for entry-attached endpoints). | |
| ContainedClassBase (const MusxInstance< EnigmaBase > &parent) | |
| Constructs a ContainedClassBase object. | |
Public Member Functions inherited from musx::dom::ContainedClassBase | |
| ContainedClassBase (const MusxInstance< EnigmaBase > &parent) | |
| Constructs a ContainedClassBase object. | |
| template<typename ParentClass = EnigmaBase> | |
| MusxInstance< ParentClass > | getParent () const |
| Get the parent. | |
Public Member Functions inherited from musx::dom::EnigmaBase | |
| Cmper | getSourcePartId () const |
| Gets the source partId for this instance. If an instance is fully shared with the score, the source is SCORE_PARTID. If an instance is partially shared or non shared, the source is the ID of the part that sourced it. | |
| ShareMode | getShareMode () const |
| Gets the sharing mode for this instance. | |
| virtual void | integrityCheck (const std::shared_ptr< EnigmaBase > &ptrToThis) |
| Performs a final consistency check after population. | |
| virtual bool | requireAllFields () const |
| Returns true if all fields are required for valid input. | |
Public Member Functions inherited from musx::dom::DocumentElement | |
| virtual | ~DocumentElement () noexcept(false)=default |
| Virtual destructor for polymorphic behavior. | |
| DocumentPtr | getDocument () const |
| Gets a reference to the Document. | |
| Cmper | getPartId () const |
| Gets the part id associated with this instance. | |
Static Public Member Functions | |
| static const xml::XmlElementArray< EndPoint > & | xmlMappingArray () |
| Required for musx::factory::FieldPopulator. | |
Public Attributes | |
| StaffCmper | staffId {} |
Staff ID (xml node is <inst>) | |
| MeasCmper | measId {} |
Measure ID (xml node is <meas>) | |
| Edu | eduPosition {} |
Edu position of endpoint (xml node is <edu>) | |
| EntryNumber | entryNumber {} |
Entry number. Zero if the endpoint is not entry-attached. (xml node is <entryNum>) | |
Additional Inherited Members | |
Public Types inherited from musx::dom::EnigmaBase | |
| enum class | ShareMode { All , Partial , None } |
| Describes how this instance is shared between part and score. More... | |
Protected Member Functions inherited from musx::dom::ContainedClassBase | |
| ContainedClassBase & | operator= (const ContainedClassBase &other) |
| Copy assignment preserves the destination DOM instance's document and parent. | |
| ContainedClassBase & | operator= (ContainedClassBase &&other) noexcept |
| Move assignment preserves the destination DOM instance's document and parent. | |
Protected Member Functions inherited from musx::dom::EnigmaBase | |
| EnigmaBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode) | |
| Constructs the base class. | |
| EnigmaBase (const EnigmaBase &)=default | |
| explicit default copy constructor | |
| EnigmaBase (EnigmaBase &&) noexcept=default | |
| explicit default move constructor | |
| EnigmaBase & | operator= (const EnigmaBase &) |
| Copy assignment preserves the destination DOM instance's document, source part, and sharing mode. | |
| EnigmaBase & | operator= (EnigmaBase &&) noexcept |
| Move assignment preserves the destination DOM instance's document, source part, and sharing mode. | |
Protected Member Functions inherited from musx::dom::DocumentElement | |
| DocumentElement (const DocumentWeakPtr &document, Cmper partId) | |
| Constructs the document element. | |
| DocumentElement (const DocumentElement &)=default | |
| explicit default copy constructor | |
| DocumentElement (DocumentElement &&) noexcept=default | |
| explicit default move constructor | |
| DocumentElement & | operator= (const DocumentElement &) |
| Copy assignment preserves the destination DOM instance's document and part ID. | |
| DocumentElement & | operator= (DocumentElement &&) noexcept |
| Move assignment preserves the destination DOM instance's document and part ID. | |
Represents an endpoint of the smart shape.
| EntryInfoPtr musx::dom::smartshape::EndPoint::calcAssociatedEntry | ( | bool | findExact = false | ) | const |
Calculates the entry associated with the endpoint.
| findExact | If true, only return an entry whose horizontal position matches the endpoint within 1 EVPU. No fallback search is performed. If false, return the closest entry in the measure, provided it lies within a quarter-beat of the endpoint. |
| MeasCmper musx::dom::smartshape::EndPoint::calcMeasure | ( | ) | const |
| StaffCmper musx::dom::smartshape::EndPoint::calcStaff | ( | ) | const |
Calculates the staff the endpoint is on.
An entry-attached endpoint is on its entry's staff, even when staffId disagrees; any other endpoint is on staffId. Prefer this over reading staffId, except to find the endpoint's assignments, which Finale keeps at the recorded staffId and measId. (See getMeasureAssignment.)
| int musx::dom::smartshape::EndPoint::compareMetricPosition | ( | const EndPoint & | other | ) | const |
Compares the metric position of two endpoints.
| other | The endpoint to compare. |
other.other.
|
inline |
Constructs a ContainedClassBase object.
| parent | A shared pointer to the parent document. |