Skip to content

Commit

Permalink
#125 Move graph_interface.hpp into a new folder <ureact/core/>
Browse files Browse the repository at this point in the history
* move all graph_interface.hpp content into a new public interface ureact::core
  • Loading branch information
YarikTH committed Sep 4, 2023
1 parent f7e707a commit d238be6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions include/ureact/adaptor/observe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class signal_observer_node final : public observer_node
this->detach_from_all();
}

UREACT_WARN_UNUSED_RESULT update_result update() override
UREACT_WARN_UNUSED_RESULT core::update_result update() override
{
if( m_subject.is_valid() )
{
Expand All @@ -150,7 +150,7 @@ class signal_observer_node final : public observer_node
detach_observer();
}

return update_result::unchanged;
return core::update_result::unchanged;
}

private:
Expand Down Expand Up @@ -188,7 +188,7 @@ class events_observer_node final : public observer_node
this->detach_from_all();
}

UREACT_WARN_UNUSED_RESULT update_result update() override
UREACT_WARN_UNUSED_RESULT core::update_result update() override
{
if( m_subject.is_valid() )
{
Expand All @@ -208,7 +208,7 @@ class events_observer_node final : public observer_node
}
}

return update_result::unchanged;
return core::update_result::unchanged;
}

private:
Expand Down
8 changes: 3 additions & 5 deletions include/ureact/detail/graph_impl.inl
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,6 @@ UREACT_FUNC void react_graph_impl::schedule_successors( node_data& parentNode )

UREACT_FUNC void react_graph_impl::propagate_node_change( const node_id nodeId )
{
using update_result = core::update_result;

node_data& node = m_node_data[nodeId];
if( std::shared_ptr<reactive_node_interface> nodePtr = node.node_ptr.lock() )
{
Expand All @@ -320,16 +318,16 @@ UREACT_FUNC void react_graph_impl::propagate_node_change( const node_id nodeId )
return;
}

const update_result result = nodePtr->update();
const core::update_result result = nodePtr->update();

// Topology changed?
if( result == update_result::shifted )
if( result == core::update_result::shifted )
{
re_schedule_node( nodeId );
return;
}

if( result == update_result::changed )
if( result == core::update_result::changed )
{
m_changed_nodes.add( nodeId );
schedule_successors( node );
Expand Down

0 comments on commit d238be6

Please sign in to comment.