MUSX Document Model
|
Static class that provides utilties to extract information from enigma strings. More...
#include <EnigmaString.h>
Public Types | |
enum class | AccidentalStyle { Ascii , Unicode , Smufl } |
Enumeration to specify the type of accidental replacement. More... | |
Static Public Member Functions | |
static bool | startsWithFontCommand (const std::string &text) |
Returns true if the enigma string starts with a font command. | |
static std::vector< std::string > | parseComponents (const std::string &input) |
Parses an enigma text insert into its constituent components. | |
static bool | parseFontCommand (const std::string &fontTag, dom::FontInfo &fontInfo) |
Incorporates an enigma font command into the supplied dom::FontInfo instance. | |
static std::string | trimFontTags (const std::string &input) |
Trims all font tags from an enigma string. | |
static std::string | trimTags (const std::string &input) |
Trims all enigma tags from an enigma string, leaving just the plain text. | |
static std::string | replaceAccidentalTags (const std::string &input, AccidentalStyle style=AccidentalStyle::Ascii) |
Replaces ^flat() and ^sharp() inserts with 'b' and '#'. | |
Static class that provides utilties to extract information from enigma strings.
|
strong |
Enumeration to specify the type of accidental replacement.
This enum class is used to choose between different representations of musical accidentals when processing text.
|
static |
Parses an enigma text insert into its constituent components.
The function takes an enigma text insert starting with ^
and extracts the command and its parameters. If the string is invalid or unbalanced, it returns an empty vector.
Examples:
input | The enigma text insert to parse. |
|
static |
Incorporates an enigma font command into the supplied dom::FontInfo instance.
Enigma font commands are
^font
, fontid
, etc. (See startsWithFontCommand.)^size
specifies the font size in points.^nfx
specifies a bit mask of style properties. These are resolved with dom::FontInfo::setEnigmaStyles.