9enum class ClefSign { G, F, C, PERCUSSION };
37 Clef(
const ClefSign sign = ClefSign::G,
int line = -1);
94 std::string
toXML(
const int clefNumber = -1,
const int identSize = 2)
const;
Represents a musical clef for a staff, including sign, line, and change status.
Definition: clef.h:19
Clef(const ClefSign sign=ClefSign::G, int line=-1)
Constructs a Clef with a given sign and line.
int getLine() const
Returns the staff line for the clef.
std::string toXML(const int clefNumber=-1, const int identSize=2) const
Serializes the clef to MusicXML format.
static ClefSign clefSignStr2ClefSign(const std::string &clefStr)
Converts a clef sign string to a ClefSign enum value.
ClefSign getSign() const
Returns the clef sign (G, F, C, percussion).
void setSign(const ClefSign sign)
Sets the clef sign and updates the staff line accordingly.
bool isClefChanged() const
Returns true if the clef has changed in the current measure.
void setLine(int line)
Sets the staff line for the clef.
std::string getClefSignStr() const
Returns the clef sign as a string ("G", "F", "C", "percussion").