29 template <
typename Base, pin_type Type>
32 typedef Base base_type;
50 if (&c->source() ==
this || &c->destination() ==
this)
95 iDestination{ aDestination }
109 return *iDestination;
113 return *iDestination;
151 std::size_t result = 0;
153 if (&c->destination().get() ==
this && c->destination().type() ==
pin_type::Input)
159 std::size_t result = 0;
169 InputAdded.trigger(*iInputs.
back());
173 auto existing = std::find_if(iInputs.begin(), iInputs.end(), [&](
auto&& e) { return &*e == &aPin; });
174 if (existing != iInputs.end())
177 iInputs.erase(existing);
178 InputRemoved.trigger(*temp);
184 OutputAdded.trigger(*iOutputs.
back());
188 auto existing = std::find_if(iOutputs.begin(), iOutputs.end(), [&](
auto&& e) { return &*e == &aPin; });
189 if (existing != iOutputs.end())
192 iOutputs.erase(existing);
193 OutputRemoved.trigger(*temp);
198 iConnections.
push_back(make_ref<node_connection>(aSource, aDestination));
199 ConnectionAdded.trigger(*iConnections.
back());
203 auto existing = std::find_if(iConnections.begin(), iConnections.end(), [&](
auto&& e) { return &e->source() == &aSource && &e->destination() == &aDestination; });
204 if (existing != iConnections.end())
207 iConnections.erase(existing);
208 ConnectionRemoved.trigger(*temp);
virtual node_connections_t const & connections() const =0
i_node_pin const & destination() const override
i_node_pin & destination() override
i_node_pin & source() override
i_node_pin const & source() const override
node_connection(i_node_pin &aSource, i_node_pin &aDestination)
i_pin_widget & as_widget() override
i_pin_widget const & as_widget() const override
i_node & get() const override
bool connected() const override
neogfx::color_or_gradient color() const override
void set_widget(i_pin_widget &aWidget) override
pin_type type() const override
void add_input(i_node_input_pin &aPin) override
void remove_input(i_node_input_pin &aPin) override
void remove_output(i_node_output_pin &aPin) override
i_node_input_pin i_node_output_pin connection_removed
i_node_input_pin output_removed
void add_connection(i_node_pin &aSource, i_node_pin &aDestination) override
neolib::vector< ref_ptr< i_node_output_pin > > node_outputs_t
neolib::vector< ref_ptr< i_node_input_pin > > node_inputs_t
void remove_connection(i_node_pin &aSource, i_node_pin &aDestination) override
std::size_t connected_inputs() const override
define_declared_event(InputAdded, input_added, i_node_input_pin &) define_declared_event(InputRemoved
void add_output(i_node_output_pin &aPin) override
std::size_t connected_outputs() const override
neolib::vector< ref_ptr< i_node_connection > > node_connections_t
node_inputs_t const & inputs() const override
node_outputs_t const & outputs() const override
node_connections_t const & connections() const override
void emplace_back(Args &&... aArgs)
const value_type & back() const final
void push_back(abstract_value_type const &aValue) final
#define define_declared_event(name, declName,...)