#include <SlashRoot.h>
Root can be the root of a Chord, Key or Scale.
◆ SlashRoot()
SlashRoot::SlashRoot |
( |
const std::string & |
name | ) |
|
|
explicit |
Parse slash root string, using regular expressions
- Parameters
-
◆ computePre()
std::string SlashRoot::computePre |
( |
const std::string & |
description | ) |
|
|
static |
Returns the pre-slash content, or whole string if no slash is present
- Parameters
-
description | to search for pre-slash content |
◆ display()
std::string SlashRoot::display |
( |
Accidental |
withOptional | ) |
const |
Display the slash root, with an adjustment symbol if it's a clean note, otherwise as-is
- Parameters
-
withOptional | adjustment symbol |
- Returns
- displayed slash root
◆ has_value() [1/2]
bool SlashRoot::has_value |
( |
| ) |
const |
- Returns
- true if any slash info is present
◆ has_value() [2/2]
bool SlashRoot::has_value |
( |
const std::string & |
name | ) |
|
|
static |
Return true if a slash is present in the given chord name
- Parameters
-
- Returns
- true if slash is found
◆ none()
No slash root
- Returns
- no slash root
◆ of()
SlashRoot SlashRoot::of |
( |
const std::string & |
name | ) |
|
|
static |
◆ operator==()
bool SlashRoot::operator== |
( |
const SlashRoot & |
other | ) |
const |
Compare two slash roots for equality
- Parameters
-
- Returns
- true if equal
◆ orDefault()
Get the pitch class of a slash root, or a default value
- Parameters
-
- Returns
- pitch class or default
◆ pitchClass
std::optional<PitchClass> XJ::SlashRoot::pitchClass |
◆ post
std::string XJ::SlashRoot::post |
◆ pre
std::string XJ::SlashRoot::pre |
The documentation for this class was generated from the following files:
- /home/runner/work/xjmusic/xjmusic/engine/include/xjmusic/music/SlashRoot.h
- /home/runner/work/xjmusic/xjmusic/engine/src/music/SlashRoot.cpp