|
MUSX Document Model
|
Represents an endpoint of the smart shape. More...
#include <SmartShape.h>
Inheritance diagram for musx::dom::smartshape::EndPoint:Public Member Functions | |
| 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). | |
| 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. | |
| const SharedNodes & | getUnlinkedNodes () const |
Gets the unlinked nodes for this instance. (Only populated for ShareMode::Partial) | |
| void | addUnlinkedNode (const std::string &nodeName) |
| Adds a shared node 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... | |
| using | SharedNodes = std::set< std::string > |
| The container type for shared nodes. | |
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 &) |
| no-op copy assignment operator allows subclasses to copy their values. | |
| EnigmaBase & | operator= (EnigmaBase &&) noexcept |
| no-op move assignment operator allows subclasses to move their values. | |
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 &) |
| no-op copy assignment operator allows subclasses to copy their values. | |
| DocumentElement & | operator= (DocumentElement &&) noexcept |
| no-op move assignment operator allows subclasses to move their values. | |
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. |
| 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. |