use std::str::FromStr;
use crate::model::mnx::{MnxId, Orientation, error::MnxError};
pub enum AccidentalEnclosureSymbol {
Brackets,
Parentheses,
}
pub enum TieTargetType {
NextNote,
Arpeggio,
CrossJump,
CrossVoice,
}
impl FromStr for TieTargetType {
type Err = MnxError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s {
"nextNone" => Ok(TieTargetType::NextNote),
"arpeggio" => Ok(TieTargetType::Arpeggio),
"crossJump" => Ok(TieTargetType::CrossJump),
"crossVoice" => Ok(TieTargetType::CrossVoice),
_ => Err(MnxError::InvalidTieTarget(s.to_string())),
}
}
}
pub struct Tie {
pub lv: bool,
pub side: Option<Orientation>,
pub target: MnxId,
pub target_type: Option<TieTargetType>,
}