MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::EntryFrame Class Reference

Represents a vector of EntryInfo instances for a given frame, along with computed information. More...

#include <Entries.h>

+ Inheritance diagram for musx::dom::EntryFrame:

Classes

struct  TupletInfo
 class to track tuplets in the frame More...
 

Public Member Functions

 EntryFrame (const details::GFrameHold &gfhold, InstCmper staff, MeasCmper measure, LayerIndex layerIndex, bool forWrittenPitch)
 Constructor function.
 
InstCmper getStaff () const
 Get the staff for the entry.
 
MeasCmper getMeasure () const
 Get the measure for the entry.
 
LayerIndex getLayerIndex () const
 Get the layer index (0..3) of the entry.
 
bool isForWrittenPitch () const
 Returns if this entry frame was created for written pitch.
 
const std::vector< std::shared_ptr< const EntryInfo > > & getEntries () const
 Get the entry list.
 
EntryInfoPtr getFirstInVoice (int voice) const
 Returns the first entry in the specified v1/v2 or null if none.
 
void addEntry (const std::shared_ptr< const EntryInfo > &entry)
 Add an entry to the list.
 
std::shared_ptr< const EntryFramegetNext () const
 Gets the entry frame for the next measure with the same staff and layer.
 
std::shared_ptr< const EntryFramegetPrevious () const
 Gets the entry frame for the previous measure with the same staff and layer.
 
- 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 getPartId () const
 Gets the partId for this instance (or 0 for score)
 
std::shared_ptr< others::PartDefinitiongetPartDefinition () const
 Gets the others::PartDefinition corresponding to getPartId.
 
ShareMode getShareMode () const
 Gets the sharing mode for this instance.
 
const SharedNodesgetUnlinkedNodes () 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 ()
 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.
 

Public Attributes

std::vector< TupletInfotupletInfo
 A list of the tuplets in the frame and their calculated starting and ending information.
 
std::shared_ptr< KeySignaturekeySignature
 

Additional Inherited Members

- 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.
 
- Protected Member Functions inherited from musx::dom::Base
 Base (const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode)
 Constructs the base class and enforces the static constexpr XmlNodeName.
 
Baseoperator= (const Base &)
 assignment constructor: m_unlinkedNodes is intentionally omitted
 

Detailed Description

Represents a vector of EntryInfo instances for a given frame, along with computed information.

Its pointers are owned by EntryInfoPtr

Constructor & Destructor Documentation

◆ EntryFrame()

musx::dom::EntryFrame::EntryFrame ( const details::GFrameHold gfhold,
InstCmper  staff,
MeasCmper  measure,
LayerIndex  layerIndex,
bool  forWrittenPitch 
)
explicit

Constructor function.

Parameters
gfholdThe details::GFrameHold instance creating this EntryFrame
staffThe Cmper for the others::Staff of the entry
measureThe Cmper for the others::Measure of the entry
layerIndexThe LayerIndex (0..3) of the entry
forWrittenPitchIf true, the key and clef for each entry are calculated for written pitch rather than concert pitch.

Member Function Documentation

◆ getFirstInVoice()

EntryInfoPtr musx::dom::EntryFrame::getFirstInVoice ( int  voice) const

Returns the first entry in the specified v1/v2 or null if none.

Parameters
voice1 or 2

◆ getNext()

std::shared_ptr< const EntryFrame > musx::dom::EntryFrame::getNext ( ) const

Gets the entry frame for the next measure with the same staff and layer.

Returns
Frame or nullpter if the next measure has no matching frame.

◆ getPrevious()

std::shared_ptr< const EntryFrame > musx::dom::EntryFrame::getPrevious ( ) const

Gets the entry frame for the previous measure with the same staff and layer.

Returns
Frame or nullpter if the previous measure has no matching frame,

◆ isForWrittenPitch()

bool musx::dom::EntryFrame::isForWrittenPitch ( ) const
inline

Returns if this entry frame was created for written pitch.

Returns
True if for written pitch, false if for sounding pitch (i.e., concert pitch)

Member Data Documentation

◆ keySignature

std::shared_ptr<KeySignature> musx::dom::EntryFrame::keySignature

this can be different than the measure key sig if the staff has independent key signatures

Todo:
This must be adjusted based on concert or transposed pitch.

◆ tupletInfo

std::vector<TupletInfo> musx::dom::EntryFrame::tupletInfo

A list of the tuplets in the frame and their calculated starting and ending information.

Note
Tuplets that start on grace notes are omitted from this list. Finale does not display them, and it is not possible to calculate their endpoints correctly in the general case. (Which is probably why Finale does not display them.)