improving documentation

This commit is contained in:
Weird Constructor 2021-06-08 03:56:40 +02:00
parent 404c8d6509
commit 718f46154f
3 changed files with 29 additions and 16 deletions

View file

@ -1102,6 +1102,20 @@ macro_rules! make_node_info_enum {
$(NodeInfo::$variant(n) => n.1.out_count()),+
}
}
pub fn desc(&self) -> &'static str {
match self {
NodeInfo::$v1 => "",
$(NodeInfo::$variant(n) => n.1.desc()),+
}
}
pub fn help(&self) -> &'static str {
match self {
NodeInfo::$v1 => "",
$(NodeInfo::$variant(n) => n.1.help()),+
}
}
}
}
}

View file

@ -40,10 +40,9 @@ impl Sin {
"Sin sig\nOscillator signal output.\n\nRange: (-1..1)\n";
pub const DESC : &'static str =
r#"Sin - A Sine Oscillator
r#"Sine Oscillator
This is a very simple oscillator that generates a
sine wave.
This is a very simple oscillator that generates a sine wave.
"#;
pub const HELP : &'static str =

View file

@ -264,7 +264,7 @@ mod util;
pub use nodes::{new_node_engine, NodeConfigurator, NodeExecutor};
pub use cell_dir::CellDir;
pub use matrix::{Matrix, Cell};
pub use dsp::{NodeId, SAtom};
pub use dsp::{NodeId, SAtom, NodeInfo};
pub use matrix_repr::load_patch_from_file;
pub use matrix_repr::save_patch_to_file;
pub use sample_lib::{SampleLibrary, SampleLoadError};