cgv
cgv::base::action Class Reference

#include <action.h>

Inheritance diagram for cgv::base::action:
cgv::base::base_method_action< X > cgv::base::find_action< X > cgv::base::method_action< X, T1 > cgv::base::method_action_2< X, T1, T2 > cgv::base::matched_method_action< X, R1, R2, T1 > cgv::base::single_method_action< X, R, T1 > cgv::base::single_method_action_2< X, R, T1, T2 >

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_policyget_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
 

Detailed Description

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.


The documentation for this class was generated from the following files: