25#include "CommonClasses.h"
56 set_start(startMeasure);
57 set_duration(numMeasures);
89 create_location(measureId, position);
116 set_measure(startMeasure);
131 using ArrayElementObject::ArrayElementObject;
Represents an MNX object that is included as an array element.
Definition BaseTypes.h:615
Represents an MNX array, encapsulating property access.
Definition BaseTypes.h:483
Base class wrapper for all MNX JSON nodes.
Definition BaseTypes.h:210
json_pointer pointer() const
Returns the json_pointer for this node.
Definition BaseTypes.h:271
T parent() const
Returns the parent object for this node.
Definition BaseTypes.h:258
const std::shared_ptr< json > & root() const
Returns the root.
Definition BaseTypes.h:288
std::pair< NumType, NumType > Initializer
initializer for Fraction class (numerator, denominator)
Definition CommonClasses.h:43
Represents a system on a page in a score.
Definition CommonClasses.h:133
Represents an element in the scores section of an MNX document.
Definition Score.h:154
MNX_REQUIRED_PROPERTY(std::string, name)
Required name, such as "Flute 1" or "Full Score".
Score(Base &parent, const std::string_view &key, const std::string &scoreName)
Creates a new Score class as a child of a JSON element.
Definition Score.h:166
MNX_OPTIONAL_CHILD(Array< score::Page >, pages)
An optional list of pages.
MNX_OPTIONAL_PROPERTY(std::string, layout)
Layout id, referring to an element in the root-level layouts array.
MNX_OPTIONAL_CHILD(Array< score::MultimeasureRest >, multimeasureRests)
List of multimeasure rests in the score.
Score(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing system layouts.
Definition Score.h:157
Represents a system layout change in a score.
Definition Score.h:70
MNX_REQUIRED_PROPERTY(std::string, layout)
Layout id, referring to an element in the root-level layouts array.
MNX_REQUIRED_CHILD(MeasureRhythmicPosition, location)
location where the new layout takes effect.
LayoutChange(Base &parent, const std::string_view &key, const std::string &layoutId, int measureId, const Fraction::Initializer &position)
Creates a new LayoutChange class as a child of a JSON element.
Definition Score.h:84
LayoutChange(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing system layouts.
Definition Score.h:73
Represents a multimeasure rest in a score.
Definition Score.h:40
MultimeasureRest(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing mm rests.
Definition Score.h:43
MultimeasureRest(Base &parent, const std::string_view &key, int startMeasure, int numMeasures)
Creates a new MultimeasureRest class as a child of a JSON element.
Definition Score.h:53
MNX_REQUIRED_PROPERTY(int, duration)
the number of measures in the multimeasure rest
MNX_OPTIONAL_PROPERTY(std::string, label)
the label to place on the multimeasure rest, if provided.
MNX_REQUIRED_PROPERTY(int, start)
the start measure of the multimeasure rest
Represents a page in a score.
Definition Score.h:129
MNX_OPTIONAL_PROPERTY(std::string, layout)
Layout id, referring to an element in the root-level layouts array.
Page(Base &parent, const std::string_view &key)
Creates a new Page class as a child of a JSON element.
Definition Score.h:136
MNX_REQUIRED_CHILD(Array< System >, systems)
and array systems on the page.
Represents a system on a page in a score.
Definition Score.h:101
System(Base &parent, const std::string_view &key, int startMeasure)
Creates a new System class as a child of a JSON element.
Definition Score.h:113
MNX_REQUIRED_PROPERTY(int, measure)
The first measure in the system.
System(const std::shared_ptr< json > &root, json_pointer pointer)
Constructor for existing system layouts.
Definition Score.h:104
MNX_OPTIONAL_PROPERTY(std::string, layout)
Layout id, referring to an element in the root-level layouts array.
MNX_OPTIONAL_CHILD(Array< LayoutChange >, layoutChanges)
layout changes in the system (e.g., for changes in stem direction)
object model for MNX format
json::json_pointer json_pointer
JSON pointer class for MNX.
Definition BaseTypes.h:197