reactive_graph_std_numeric_model/component/
numeric_gate.rs1use crate::NAMESPACE_NUMERIC;
2use reactive_graph_graph::component_ty;
3use reactive_graph_graph::properties;
4use reactive_graph_reactive_model_api::entity_model;
5use reactive_graph_std_result_model::ResultNumberF64;
6use reactive_graph_std_result_model::ResultNumberI64;
7
8properties!(NumericGateProperties, (LHS, "lhs", 0.0), (RHS, "rhs", 0.0));
9
10component_ty!(COMPONENT_NUMERIC_GATE, NAMESPACE_NUMERIC, COMPONENT_NAME_NUMERIC_GATE, "numeric_gate");
11
12entity_model!(NumericGateF64, get result f64, set lhs f64, set rhs f64);
13impl ResultNumberF64 for NumericGateF64 {}
14
15entity_model!(NumericGateI64, get result i64, set lhs i64, set rhs i64);
16impl ResultNumberI64 for NumericGateI64 {}