Skip to content

Commit

Permalink
GUI2/Iterator: added some alias templates and a get() function
Browse files Browse the repository at this point in the history
(cherry-picked from commit 1eaa51b)
  • Loading branch information
Vultraz committed Oct 7, 2018
1 parent 4b6d883 commit 4dd931b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/gui/auxiliary/iterator/iterator.hpp
Expand Up @@ -101,8 +101,22 @@ class iterator : private order
{
return &(operator*());
}

/** See @ref operator*. */
widget* get()
{
return operator->();
}
};

/* Helper aliases templates. */

template<bool visit_self, bool visit_internal, bool visit_child>
using top_down_iterator = iterator<policy::order::top_down<visit_self, visit_internal, visit_child>>;

template<bool visit_self, bool visit_internal, bool visit_child>
using bottom_up_iterator = iterator<policy::order::bottom_up<visit_self, visit_internal, visit_child>>;

} // namespace iteration

} // namespace gui2

0 comments on commit 4dd931b

Please sign in to comment.