pedalkernel/compiler/components/
mod.rs1mod active_ics;
7mod delay;
8mod diodes;
9mod modulation;
10mod passives;
11mod switches;
12mod tape_head;
13mod transformer;
14mod transistors;
15mod tubes;
16
17pub use active_ics::*;
18pub use delay::*;
19pub use diodes::*;
20pub use modulation::*;
21pub use passives::*;
22pub use switches::*;
23pub use tape_head::*;
24pub use transformer::*;
25pub use transistors::*;
26pub use tubes::*;
27
28macro_rules! impl_component_dyn {
31 () => {
32 fn clone_box(&self) -> Box<dyn crate::compiler::component::Component> {
33 Box::new(self.clone())
34 }
35 fn as_any(&self) -> &dyn std::any::Any {
36 self
37 }
38 fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
39 self
40 }
41 fn dyn_eq(&self, other: &dyn crate::compiler::component::Component) -> bool {
42 other
43 .as_any()
44 .downcast_ref::<Self>()
45 .map_or(false, |o| self == o)
46 }
47 };
48}
49pub(crate) use impl_component_dyn;