cgv
Loading...
Searching...
No Matches
action.cxx
1#include <cgv/base/action.h>
2
3namespace cgv {
4 namespace base {
5
6action::action(bool _default_result_begin, bool _default_result_end)
7: default_result_begin(_default_result_begin), default_result_end(_default_result_end)
8{
9}
10
12void action::set_default_results(bool _default_result)
13{
14 default_result_begin = default_result_end = _default_result;
15}
16
18void action::set_default_result_begin(bool _default_result_begin)
19{
20 default_result_begin = _default_result_begin;
21}
22
24void action::set_default_result_end(bool _default_result_end)
25{
26 default_result_end = _default_result_end;
27}
28
32
34{
35 return false;
36}
37
39{
40 return 0;
41}
42
44{
45 return default_result_begin;
46}
47
49{
50 return default_result_end;
51}
52
55{
56 return false;
57}
58
59
60 }
61}
void set_default_result_end(bool _default_result_end)
sets the value that is returned for on_end events
Definition action.cxx:24
void set_default_result_begin(bool _default_result_begin)
sets the value that is returned for on_begin events
Definition action.cxx:18
virtual bool implements_action() const
check if the current object implements the interface needed for this action
Definition action.cxx:33
virtual bool has_begin_only() const
check whether the action has registered a single begin method or both begin and end methods
Definition action.cxx:54
action(bool _default_result_begin, bool _default_result_end)
construct with default return values for the begin and end method
Definition action.cxx:6
virtual bool end()
perform the leave part of the action on the current object
Definition action.cxx:48
virtual bool begin()
perform the enter part of the action on the current object
Definition action.cxx:43
void set_default_results(bool _default_result)
sets the value that is returned, whenever no result is obtained from the traversed methods
Definition action.cxx:12
virtual traverse_policy * get_policy() const
return the traverse_policy of the current object if available or 0 otherwise
Definition action.cxx:38
virtual void select(base_ptr p)
make the passed object current
Definition action.cxx:29
base class for all classes that can be registered with support for dynamic properties (see also secti...
Definition base.h:75
nodes should inherit from this policy class to allow selective tree traversals
Definition traverser.h:24
the cgv namespace
Definition print.h:11