|
MUSX Document Model
|
Represents beam alterations applied to a specific entry. This is used to apply additional shaping or offset values both primary and secondary beams. Which stem direction this instance controls is determined by the subclass that inherits this class as a base. More...
#include <Details.h>
Inheritance diagram for musx::dom::details::BeamAlterations:Public Types | |
| using | FlattenStyle = options::BeamOptions::FlattenStyle |
| see options::BeamOptions::FlattenStyle | |
Public Types inherited from musx::dom::EntryDetailsBase | |
| enum class | StemSelection { MatchEntry , UpStem , DownStem , Any } |
| The options for choosing which version to retrieve for stem-specific details. More... | |
Public Types inherited from musx::dom::Base | |
| 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. | |
Public Member Functions | |
| BeamAlterations (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, std::optional< Inci > inci=std::nullopt) | |
| Constructor. | |
| Efix | calcEffectiveBeamWidth () const |
| Calculates the effective beam width by returning either the default width or the width override value specified by beamWidth. | |
| bool | isActive () const |
| Returns whether this beam alteration record is active. Its flattenStyle must match the value in options::BeamOptions. | |
Public Member Functions inherited from musx::dom::EntryDetailsBase | |
| EntryNumber | getEntryNumber () const |
Gets the entnum key value. | |
Public Member Functions inherited from musx::dom::DetailsBase | |
| DetailsBase (const DetailsBase &)=default | |
| explicit default copy constructor | |
| DetailsBase (DetailsBase &&) noexcept=default | |
| explicit default move constructor | |
| Cmper | getCmper1 () const |
Gets the cmper1 key value. | |
| Cmper | getCmper2 () const |
Gets the cmper2 key value. | |
| std::optional< Inci > | getInci () const |
Gets the optional array index (inci). | |
| Cmper | getRequestedPartId () const |
| If this instance was retrieved from an object pool, it contains the part ID that was used to retrieve it. If this value is different than getSourcePartId, then this instance is a copy of the pool instance. | |
Public Member Functions inherited from musx::dom::Base | |
| virtual | ~Base () noexcept(false)=default |
| Virtual destructor for polymorphic behavior. | |
| DocumentPtr | getDocument () const |
| Gets a reference to the Document. | |
| 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< Base > &ptrToThis) |
| Allows a class to determine if it has been properly contructed by the factory and fix issues that it can, such as creating default instances of contained classes. | |
| virtual bool | requireAllFields () const |
| Specifies if the parser should alert (print or throw) when an unknown xml tag is found for this class. | |
Static Public Member Functions | |
| template<typename T , std::enable_if_t< std::is_base_of_v< BeamAlterations, T >, int > = 0> | |
| static void | calcAllActiveFlags (const DocumentPtr &document) |
| Used by the factory to set active indicators. | |
| static MusxInstance< BeamAlterations > | getPrimaryForStem (const EntryInfoPtr &entryInfo, StemSelection stemSelection=StemSelection::MatchEntry) |
Gets the beam extension record for the specified stemSelection. | |
| static MusxInstance< BeamAlterations > | getSecondaryForStem (const EntryInfoPtr &entryInfo, Edu dura, StemSelection stemSelection=StemSelection::MatchEntry) |
Gets the beam extension record for the specified stemSelection. | |
| static const xml::XmlElementArray< BeamAlterations > & | xmlMappingArray () |
| Required for musx::factory::FieldPopulator. | |
Public Attributes | |
| Evpu | leftOffsetH {} |
Horizontal adjustment of the beam start. (xml node is <xAdd>) | |
| Evpu | leftOffsetY {} |
Vertical adjustment of the beam start. (xml node is <yAdd>) | |
| Evpu | rightOffsetH {} |
Horizontal adjustment of the beam end. (xml node is <sxAdd>) | |
| Evpu | rightOffsetY {} |
Vertical adjustment of the beam end. (xml node is <syAdd>) | |
| Edu | dura {} |
| For secondary beams, specifies the duration corresponding to the secondary beam (16th beam is 256, 32nd beam is 128, etc.) | |
| FlattenStyle | flattenStyle {} |
Beam shaping style (xml node is <context>). | |
| Efix | beamWidth {} |
| The calcEffectiveBeamWidth method handles this for you. | |
Static Protected Member Functions | |
| template<typename SecondaryBeamType > | |
| static bool | calcIsFeatheredBeamImpl (const EntryInfoPtr &entryInfo, Evpu &outLeftY, Evpu &outRightY) |
| Implementation of SecondaryBeamAlterationsDownStem::calcIsFeatheredBeam and SecondaryBeamAlterationsUpStem::calcIsFeatheredBeam. | |
| template<typename SecondaryBeamType > | |
| static MusxInstanceList< SecondaryBeamType > | getSecondaryBeamArray (const EntryInfoPtr &entryInfo) |
| Generalized getter for secondary beam type arrays for either stem direction. | |
Static Protected Member Functions inherited from musx::dom::EntryDetailsBase | |
| template<typename EDUP , typename EDDOWN , typename EDBASE > | |
| static MusxInstance< EDBASE > | getStemDependentDetail (const EntryInfoPtr &entryInfo, StemSelection stemSelection) |
| Implement retrieval of stem-specific details. (Actual functions are defined per stem-specific class) | |
Additional Inherited Members | |
Protected Member Functions inherited from musx::dom::EntryDetailsBase | |
| EntryDetailsBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, EntryNumber entnum, std::optional< Inci > inci=std::nullopt) | |
| Constructs a EntryDetailsBase object. | |
Protected Member Functions inherited from musx::dom::DetailsBase | |
| DetailsBase (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper1, Cmper cmper2, std::optional< Inci > inci=std::nullopt) | |
| Constructs a DetailsBase object. | |
| DetailsBase & | operator= (const DetailsBase &other) |
| Assignment operator delegates to base, preserving OthersBase state. | |
| DetailsBase & | operator= (DetailsBase &&other) noexcept |
| Assignment operator delegates to base, preserving OthersBase state. | |
Protected Member Functions inherited from musx::dom::Base | |
| Base (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode) | |
| Constructs the base class. | |
| Base (const Base &)=default | |
| explicit default copy constructor | |
| Base (Base &&) noexcept=default | |
| explicit default move constructor | |
| Base & | operator= (const Base &) |
| no-op copy assignment operator allows subclasses to copy their values. | |
| Base & | operator= (Base &&) noexcept |
| no-op move assignment operator allows subclasses to move their values. | |
Represents beam alterations applied to a specific entry. This is used to apply additional shaping or offset values both primary and secondary beams. Which stem direction this instance controls is determined by the subclass that inherits this class as a base.
|
inlineexplicit |
Constructor.
| document | A weak pointer to the associated document. |
| partId | The part this is for. |
| shareMode | The sharing mode. |
| entnum | The entry number this applies to. |
| inci | The inci (if supplied) |
| Efix musx::dom::details::BeamAlterations::calcEffectiveBeamWidth | ( | ) | const |
Calculates the effective beam width by returning either the default width or the width override value specified by beamWidth.
|
static |
Gets the beam extension record for the specified stemSelection.
| entryInfo | The entry to search. |
| stemSelection | The choice of which stem version to get. |
|
static |
Gets the beam extension record for the specified stemSelection.
| entryInfo | The entry to search. |
| dura | The duration corresponding to the secondary beam to retrieve. (16th beam is 256, 32nd beam is 128, etc.) |
| stemSelection | The choice of which stem version to get. |
|
inline |
Returns whether this beam alteration record is active. Its flattenStyle must match the value in options::BeamOptions.
| Efix musx::dom::details::BeamAlterations::beamWidth {} |
The calcEffectiveBeamWidth method handles this for you.
Beam width. A value of -1 indicates to use the default beam width from options::BeamOptions.