cgv
|
The action class is used in tree traversals together with the traverser. More...
#include <action.h>
Public Member Functions | |
action (bool _default_result_begin, bool _default_result_end) | |
construct with default return values for the begin and end method | |
void | set_default_results (bool _default_result) |
sets the value that is returned, whenever no result is obtained from the traversed methods | |
void | set_default_result_begin (bool _default_result_begin) |
sets the value that is returned for on_begin events | |
void | set_default_result_end (bool _default_result_end) |
sets the value that is returned for on_end events | |
virtual void | select (base_ptr p) |
make the passed object current | |
virtual bool | implements_action () const |
check if the current object implements the interface needed for this action | |
virtual traverse_policy * | get_policy () const |
return the traverse_policy of the current object if available or 0 otherwise | |
virtual bool | begin () |
perform the enter part of the action on the current object | |
virtual bool | end () |
perform the leave part of the action on the current object | |
virtual bool | has_begin_only () const |
check whether the action has registered a single begin method or both begin and end methods | |
Protected Attributes | |
bool | default_result_begin |
bool | default_result_end |
The action class is used in tree traversals together with the traverser.
It implements the interface needed to perform an action on an arbitrary object.
construct with default return values for the begin and end method
Definition at line 6 of file action.cxx.
|
virtual |
perform the enter part of the action on the current object
Reimplemented in cgv::base::single_method_action< X, R, T1 >, cgv::base::matched_method_action< X, R1, R2, T1 >, cgv::base::single_method_action_2< X, R, T1, T2 >, and cgv::base::find_action< X >.
Definition at line 43 of file action.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
|
virtual |
perform the leave part of the action on the current object
Reimplemented in cgv::base::matched_method_action< X, R1, R2, T1 >.
Definition at line 48 of file action.cxx.
Referenced by cgv::base::base_generator::add_void(), cgv::base::analyze_command(), cgv::base::base_generator::changed(), cgv::base::base_generator::del(), cgv::render::context::disable_light_source(), cgv::render::context::enable_light_source(), cgv::render::shader_code::find_file(), cgv::base::base_generator::get_property_declarations(), cgv::base::base_generator::get_void(), cgv::render::context::is_light_source_enabled(), cgv::data::interval_map< Key, T >::lower_bound(), cgv::base::register_object_internal(), cgv::render::context::remove_light_source(), cgv::render::shader_code::resolve_includes(), cgv::render::shader_code::retrieve_code(), cgv::render::shader_code::set_vertex_attrib_locations(), cgv::base::base_generator::set_void(), and cgv::base::traverser::traverse_tmp_1().
|
virtual |
return the traverse_policy of the current object if available or 0 otherwise
Reimplemented in cgv::base::base_method_action< X >.
Definition at line 38 of file action.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
|
virtual |
check whether the action has registered a single begin method or both begin and end methods
Reimplemented in cgv::base::single_method_action< X, R, T1 >, and cgv::base::single_method_action_2< X, R, T1, T2 >.
Definition at line 54 of file action.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
|
virtual |
check if the current object implements the interface needed for this action
Reimplemented in cgv::base::base_method_action< X >, and cgv::base::find_action< X >.
Definition at line 33 of file action.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
make the passed object current
Reimplemented in cgv::base::base_method_action< X >, and cgv::base::find_action< X >.
Definition at line 29 of file action.cxx.
Referenced by cgv::base::traverser::traverse_tmp_1().
sets the value that is returned for on_begin events
Definition at line 18 of file action.cxx.
sets the value that is returned for on_end events
Definition at line 24 of file action.cxx.
sets the value that is returned, whenever no result is obtained from the traversed methods
Definition at line 12 of file action.cxx.