CLI UML
This commit is contained in:
parent
7db0d90a1d
commit
227d6bcec3
1 changed files with 102 additions and 3 deletions
|
@ -6,10 +6,109 @@ component clap {
|
|||
interface Parser
|
||||
}
|
||||
|
||||
component cli {
|
||||
struct Cli {}
|
||||
component fasteval {
|
||||
enum Instruction
|
||||
}
|
||||
|
||||
Cli ..|> Parser
|
||||
component mp3lame-encoder {
|
||||
enum Quality
|
||||
enum Bitrate
|
||||
}
|
||||
|
||||
component hound {
|
||||
enum SampleFormat
|
||||
}
|
||||
|
||||
component cli {
|
||||
struct Cli {
|
||||
mode: Mode
|
||||
}
|
||||
enum Mode {
|
||||
Play(PlayOpts)
|
||||
Export(ExportOpts)
|
||||
Help(HelpOpts)
|
||||
}
|
||||
Cli --> Mode
|
||||
struct PlayOpts {
|
||||
input: Input
|
||||
instrument: Instruction [-i, --instrument]
|
||||
length: Instruction [-l, --length]
|
||||
variables: HashMap<char, f64> [-v, --variable]
|
||||
macros: HashMap<char, String> [-m, --macro]
|
||||
slopes: HashMap<String, (char, Instruction)> [-s, --slope]
|
||||
}
|
||||
Mode --> PlayOpts
|
||||
enum Input {
|
||||
File(File)
|
||||
Stdin(Stdin) [default]
|
||||
String(String) [-c]
|
||||
}
|
||||
PlayOpts --> Input
|
||||
struct ExportOpts {
|
||||
playopts: PlayOpts
|
||||
format: Format
|
||||
output: Output [-c]
|
||||
}
|
||||
Mode --> ExportOpts
|
||||
enum Format {
|
||||
Mp3 {bitrate: Bitrate, quality: Quality}
|
||||
Wav {bps: u16, sample_format: SampleFormat}
|
||||
Flac {bps: usize}
|
||||
Raw(RawFormat)
|
||||
}
|
||||
enum RawFormat {
|
||||
ALaw
|
||||
F32Be
|
||||
F32Le
|
||||
F64Be
|
||||
F64Le
|
||||
MuLaw
|
||||
S8
|
||||
S16Be
|
||||
S16Le
|
||||
S24Be
|
||||
S24Le
|
||||
S32Be
|
||||
S32Le
|
||||
U8
|
||||
U16Be
|
||||
U16Le
|
||||
U24Be
|
||||
U24Le
|
||||
U32Be
|
||||
U32Le
|
||||
}
|
||||
Format --> RawFormat: "feature = "raw""
|
||||
ExportOpts --> Format
|
||||
enum Output {
|
||||
File(File)
|
||||
Stdout(Stdout) [default]
|
||||
}
|
||||
ExportOpts --> Output
|
||||
PlayOpts <-- ExportOpts
|
||||
enum HelpOpts {
|
||||
Syntax
|
||||
Examples
|
||||
Example(u8)
|
||||
Format
|
||||
}
|
||||
Mode --> HelpOpts
|
||||
}
|
||||
|
||||
component flacenc-rs {
|
||||
|
||||
}
|
||||
|
||||
component raw_audio {
|
||||
|
||||
}
|
||||
|
||||
cli ..|> Parser: derive
|
||||
PlayOpts --> Instruction
|
||||
Format --> Bitrate: "feature = "mp3""
|
||||
Format --> Quality: "feature = "mp3""
|
||||
Format --> SampleFormat: "feature = "wav""
|
||||
Format ..> "flacenc-rs": "feature = "flac""
|
||||
Format ..> raw_audio: "feature = "raw""
|
||||
|
||||
@enduml
|
Loading…
Add table
Add a link
Reference in a new issue