24#include "Enumerations.h"
65 operator Required()
const {
return { part() }; }
68 static Required make(
const std::string& partId) {
return { partId }; }
85 using ContentObject::ContentObject;
112 using ContentObject::ContentObject;
147 using ArrayElementObject::ArrayElementObject;
Represents an MNX object that is included as an array element.
Definition BaseTypes.h:664
Represents an MNX array, encapsulating property access.
Definition BaseTypes.h:499
Base class wrapper for all MNX JSON nodes.
Definition BaseTypes.h:198
json_pointer pointer() const
Returns the json_pointer for this node.
Definition BaseTypes.h:260
T parent() const
Returns the parent object for this node.
Definition BaseTypes.h:246
const std::shared_ptr< json > & root() const
Returns the root.
Definition BaseTypes.h:280
Class for content arrays.
Definition BaseTypes.h:763
Base class for objects that are elements of content arrays.
Definition BaseTypes.h:685
Represents the element of the layout array in an MNX document.
Definition Layout.h:145
MNX_REQUIRED_CHILD(ContentArray, content)
Required child containing the layout content (groups and staves).
Layout(Base &parent, std::string_view key)
Creates a new Layout class as a child of a JSON element.
Definition Layout.h:152
static constexpr std::string_view JsonSchemaTypeName
required for mapping
Definition Layout.h:161
Represents a groups of staves within an MNX layout.
Definition Layout.h:110
StaffGroupBarlineOverride calcBarlineOverride() const
Calculates the effective barline override.
Definition Implementations.cpp:639
bool calcIsPartGroup() const
Calculates whether all staves in this group subtree use the same part id.
Definition Implementations.cpp:614
MNX_OPTIONAL_PROPERTY(LayoutSymbol, symbol)
The symbol down the left side.
Group(Base &parent, std::string_view key)
Creates a new Group class as a child of a JSON element.
Definition Layout.h:117
MNX_REQUIRED_CHILD(ContentArray, content)
Required child containing the layout content (groups and staves).
MNX_OPTIONAL_PROPERTY(std::string, label)
Label to be rendered to the left of the group.
MNX_OPTIONAL_PROPERTY_WITH_DEFAULT(StaffGroupBarlineStyle, barlineStyle, StaffGroupBarlineStyle::Instrument)
barline override settings
static constexpr std::string_view ContentTypeValue
type value that identifies the type within the content array
Definition Layout.h:135
Represents a staff source for a staff in a layout in a score.
Definition Layout.h:40
static Required make(const std::string &partId)
Create a Required instance for StaffSource.
Definition Layout.h:68
MNX_OPTIONAL_PROPERTY(std::string, label)
Text to appear to the left of the staff.
MNX_OPTIONAL_PROPERTY(StemDirection, stem)
The stem direction for this staff source.
MNX_OPTIONAL_PROPERTY(std::string, voice)
The voice id to draw from.
StaffSource(Base &parent, std::string_view key, const std::string &partId)
Creates a new StaffSource class as a child of a JSON element.
Definition Layout.h:58
StaffSource(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing staff sources.
Definition Layout.h:49
MNX_OPTIONAL_PROPERTY_WITH_DEFAULT(int, staff, 1)
The staff number within the part.
MNX_OPTIONAL_PROPERTY(LabelRef, labelref)
The labelref to use (rather than label)
MNX_REQUIRED_PROPERTY(std::string, part)
Id of the part to draw from.
Represents a single staff instance within an MNX layout.
Definition Layout.h:83
static constexpr std::string_view ContentTypeValue
type value that identifies the type within the content array
Definition Layout.h:102
MNX_REQUIRED_CHILD(Array< StaffSource >, sources)
The sources for this staff.
Staff(Base &parent, std::string_view key)
Creates a new Staff class as a child of a JSON element.
Definition Layout.h:90
MNX_OPTIONAL_PROPERTY(LabelRef, labelref)
The labelref to use (rather than label)
MNX_OPTIONAL_PROPERTY(LayoutSymbol, symbol)
The symbol down the left side.
MNX_OPTIONAL_PROPERTY(std::string, label)
Label to be rendered to the left of the staff.
object model for MNX format
StaffGroupBarlineOverride
Resolved barline override setting for a layout staff group.
Definition Enumerations.h:284
json::json_pointer json_pointer
JSON pointer class for MNX.
Definition BaseTypes.h:68
LayoutSymbol
The symbols available to bracket a staff group.
Definition Enumerations.h:136
LabelRef
The values available in a labelref.
Definition Enumerations.h:126
StemDirection
The values available in a labelref.
Definition Enumerations.h:295
StaffGroupBarlineStyle
The types of barline overrides for staff groups in layouts.
Definition Enumerations.h:270
@ Instrument
currently interpreted as no override or unified, depending on whether the group is single- or multi-i...
initializer class for StaffSource
Definition Layout.h:44
std::string partId
the part to use as a source
Definition Layout.h:45