cgv
Loading...
Searching...
No Matches
cgv::base::base_method_action< X > Class Template Reference

base class for all actions that use methods of class X More...

#include <action.h>

Inheritance diagram for cgv::base::base_method_action< X >:
cgv::base::action 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

 base_method_action (bool _default_result_begin, bool _default_result_end)
 construct from default return values that are passed on to the base class
 
void select (base_ptr p)
 implement the select method and store pointers of type X* and traverse_policy*
 
bool implements_action () const
 simply return whether the stored pointer of type X* is not 0
 
traverse_policyget_policy () const
 simply return the stored pointer of type traverse_policy*
 
- Public Member Functions inherited from cgv::base::action
 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 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

traverse_policytp
 
X * x
 
- Protected Attributes inherited from cgv::base::action
bool default_result_begin
 
bool default_result_end
 

Detailed Description

template<class X>
class cgv::base::base_method_action< X >

base class for all actions that use methods of class X

Definition at line 58 of file action.h.

Constructor & Destructor Documentation

◆ base_method_action()

template<class X >
cgv::base::base_method_action< X >::base_method_action ( bool  _default_result_begin,
bool  _default_result_end 
)
inline

construct from default return values that are passed on to the base class

Definition at line 65 of file action.h.

Member Function Documentation

◆ get_policy()

template<class X >
traverse_policy * cgv::base::base_method_action< X >::get_policy ( ) const
inlinevirtual

simply return the stored pointer of type traverse_policy*

Reimplemented from cgv::base::action.

Definition at line 78 of file action.h.

◆ implements_action()

template<class X >
bool cgv::base::base_method_action< X >::implements_action ( ) const
inlinevirtual

simply return whether the stored pointer of type X* is not 0

Reimplemented from cgv::base::action.

Definition at line 74 of file action.h.

◆ select()

template<class X >
void cgv::base::base_method_action< X >::select ( base_ptr  p)
inlinevirtual

implement the select method and store pointers of type X* and traverse_policy*

Reimplemented from cgv::base::action.

Definition at line 69 of file action.h.

Member Data Documentation

◆ tp

template<class X >
traverse_policy* cgv::base::base_method_action< X >::tp
protected

Definition at line 61 of file action.h.

◆ x

template<class X >
X* cgv::base::base_method_action< X >::x
protected

Definition at line 62 of file action.h.


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