28 template <
bool VW,
bool VG,
bool VC>
41 while(!visit_child::at_end(*
root_)) {
59 return visit_widget::at_end(*
root_) && visit_grid::at_end(*
root_)
60 && visit_child::at_end(*
root_);
66 ERR_GUI_I <<
"Tried to move beyond end of the iteration range.";
67 throw range_error(
"Tried to move beyond end of range.");
74 if(!visit_widget::at_end(*
root_)) {
75 switch(visit_widget::next(*
root_)) {
84 ERR_GUI_E <<
"Tried to move beyond end of "
85 "the widget iteration range.";
86 throw range_error(
"Tried to move beyond end of range.");
94 if(!visit_grid::at_end(*
root_)) {
95 switch(visit_grid::next(*
root_)) {
104 ERR_GUI_E <<
"Tried to move beyond end of "
105 "the grid iteration range.";
106 throw range_error(
"Tried to move beyond end of range.");
115 if(visit_child::at_end(*
root_)) {
126 if(!visit_child::at_end(*
root_)) {
127 switch(visit_child::next(*
root_)) {
136 ERR_GUI_E <<
"Tried to move beyond end of "
137 "the child iteration range.";
138 throw range_error(
"Tried to move beyond end of range.");
144 while(!visit_child::at_end(*
root_)) {
155 ERR_GUI_I <<
"Tried to defer beyond end its "
156 "iteration range iterator.";
157 throw logic_error(
"Tried to defer an invalid iterator.");
159 if(!visit_widget::at_end(*
root_)) {
162 if(!visit_grid::at_end(*
root_)) {
165 if(!visit_child::at_end(*
root_)) {
168 ERR_GUI_I <<
"The iterator ended in an unknown "
169 "state while deferring itself.";
170 throw logic_error(
"Tried to defer an invalid iterator.");
176 std::vector<iteration::walker_ptr>
stack_;
179 template <
bool VW,
bool VG,
bool VC>
199 if(!
root_)
return true;
200 return visit_widget::at_end(*
root_) && visit_grid::at_end(*
root_)
201 && visit_child::at_end(*
root_);
207 ERR_GUI_I <<
"Tried to move beyond end of the iteration range.";
208 throw range_error(
"Tried to move beyond end of range.");
215 if(!visit_widget::at_end(*
root_)) {
216 switch(visit_widget::next(*
root_)) {
225 ERR_GUI_E <<
"Tried to move beyond end of the "
226 "widget iteration range.";
227 throw range_error(
"Tried to move beyond end of range.");
235 if(!visit_grid::at_end(*
root_)) {
236 switch(visit_grid::next(*
root_)) {
245 ERR_GUI_E <<
"Tried to move beyond end of the grid "
247 throw range_error(
"Tried to move beyond end of range.");
256 if(visit_child::at_end(*
root_)) {
263 if(!visit_child::at_end(*
root_)) {
279 ERR_GUI_I <<
"Tried to defer beyond end of the iteration "
281 throw logic_error(
"Tried to defer an invalid iterator.");
283 if(!visit_widget::at_end(*
root_)) {
286 if(!visit_grid::at_end(*
root_)) {
289 if(!visit_child::at_end(*
root_)) {
292 ERR_GUI_I <<
"The iterator ended in an unknown "
293 "state while deferring iteself.";
294 throw logic_error(
"Tried to defer an invalid iterator.");
304 switch(visit_child::next(*
root_)) {
312 throw range_error(
"Tried to move beyond end of range.");
320 std::vector<iteration::walker_ptr>
stack_;
Thrown when deferring an invalid iterator.
iteration::walker_ptr root_
visit_level< VW, walker_base::self > visit_widget
std::vector< iteration::walker_ptr > stack_
visit_level< VG, walker_base::internal > visit_grid
visit_level< VC, walker_base::child > visit_child
visit_level< VC, walker_base::child > visit_child
visit_level< VG, walker_base::internal > visit_grid
std::vector< iteration::walker_ptr > stack_
visit_level< VW, walker_base::self > visit_widget
iteration::walker_ptr root_
Helper class to select to visit or skip a level.
Thrown when moving an invalid iterator.
@ invalid
When calling next the following it has the following results.
@ valid
When calling next the following it has the following results.
Contains the exceptions thrown by the gui2::iteration::iterator classes.
Define the common log macros for the gui toolkit.
std::unique_ptr< class walker_base > walker_ptr