|
cgv
|
nodes should inherit from this policy class to allow selective tree traversals More...
#include <traverser.h>
Public Member Functions | |
| traverse_policy (int _policy=TP_ALL+TP_STOP_ON_SUCCESS, bool _active=true, int _focus=-1) | |
| construct default traverse policy that visits everything | |
| int | get_policy () const |
| return the policy without the stop on success flag | |
| bool | stop_on_success () const |
| return whether to stop on success | |
| bool | stop_on_failure () const |
| return whether to stop on failure | |
| void | set_policy (int _policy) |
| set a new policy, always add stop on success flag if needed | |
| int | get_focused_child () const |
| return the focused child or -1 if none is focused | |
| void | set_focused_child (int _focused_child) |
| set the focused child | |
| bool | get_active () const |
| return whether the current node is active | |
| void | set_active (bool _active) |
| set the active flag of the current node | |
Protected Attributes | |
| TraversePolicy | policy |
| bool | active |
| int | focus |
nodes should inherit from this policy class to allow selective tree traversals
Definition at line 23 of file traverser.h.
| cgv::base::traverse_policy::traverse_policy | ( | int | _policy = TP_ALL+TP_STOP_ON_SUCCESS, |
| bool | _active = true, |
||
| int | _focus = -1 |
||
| ) |
construct default traverse policy that visits everything
Definition at line 7 of file traverser.cxx.
| bool cgv::base::traverse_policy::get_active | ( | ) | const |
return whether the current node is active
Definition at line 39 of file traverser.cxx.
Referenced by cgv::app::gizmo::handle(), and cgv::base::traverser::traverse_tmp_1().
| int cgv::base::traverse_policy::get_focused_child | ( | ) | const |
return the focused child or -1 if none is focused
Definition at line 31 of file traverser.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
| int cgv::base::traverse_policy::get_policy | ( | ) | const |
return the policy without the stop on success flag
Definition at line 11 of file traverser.cxx.
References cgv::base::TP_STOP_ON_FAILURE, and cgv::base::TP_STOP_ON_SUCCESS.
Referenced by cgv::base::traverser::traverse_tmp_1().
set the active flag of the current node
Definition at line 43 of file traverser.cxx.
set the focused child
Definition at line 35 of file traverser.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
set a new policy, always add stop on success flag if needed
Definition at line 27 of file traverser.cxx.
| bool cgv::base::traverse_policy::stop_on_failure | ( | ) | const |
return whether to stop on failure
Definition at line 22 of file traverser.cxx.
References cgv::base::TP_STOP_ON_FAILURE.
Referenced by cgv::base::traverser::traverse_tmp_1(), and cgv::base::traverser::traverse_tmp_2().
| bool cgv::base::traverse_policy::stop_on_success | ( | ) | const |
return whether to stop on success
Definition at line 16 of file traverser.cxx.
References cgv::base::TP_STOP_ON_SUCCESS.
Referenced by cgv::base::traverser::traverse_tmp_1(), and cgv::base::traverser::traverse_tmp_2().
|
protected |
Definition at line 27 of file traverser.h.
|
protected |
Definition at line 28 of file traverser.h.
|
protected |
Definition at line 26 of file traverser.h.