cgv
Loading...
Searching...
No Matches
cgv::base::method_action_2< X, T1, T2 > Class Template Reference

base class for all method actions that take a single argument of type T1 in their signature More...

#include <action.h>

Inheritance diagram for cgv::base::method_action_2< X, T1, T2 >:
cgv::base::base_method_action< X > cgv::base::action cgv::base::single_method_action_2< X, R, T1, T2 >

Public Member Functions

 method_action_2 (T1 _v1, T2 _v2, bool _default_result_begin, bool _default_result_end)
 construct action from signature and default return values
 
void set_signature (T1 _v1, T2 _v2)
 set a new signature with which the methods of the traversed nodes are called
 
bool call_method (void(X::*mp)(T1, T2), bool default_result)
 call a void method given a default return value
 
bool call_method (bool(X::*mp)(T1, T2), bool default_result)
 call a bool method given a default return value
 
- Public Member Functions inherited from cgv::base::base_method_action< X >
 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

T1 v1
 
T2 v2
 
- Protected Attributes inherited from cgv::base::base_method_action< X >
traverse_policytp
 
X * x
 
- Protected Attributes inherited from cgv::base::action
bool default_result_begin
 
bool default_result_end
 

Detailed Description

template<class X, typename T1, typename T2>
class cgv::base::method_action_2< X, T1, T2 >

base class for all method actions that take a single argument of type T1 in their signature

Definition at line 159 of file action.h.

Constructor & Destructor Documentation

◆ method_action_2()

template<class X , typename T1 , typename T2 >
cgv::base::method_action_2< X, T1, T2 >::method_action_2 ( T1  _v1,
T2  _v2,
bool  _default_result_begin,
bool  _default_result_end 
)
inline

construct action from signature and default return values

Definition at line 166 of file action.h.

Member Function Documentation

◆ call_method() [1/2]

template<class X , typename T1 , typename T2 >
bool cgv::base::method_action_2< X, T1, T2 >::call_method ( bool(X::*)(T1, T2 mp,
bool  default_result 
)
inline

call a bool method given a default return value

Definition at line 177 of file action.h.

◆ call_method() [2/2]

template<class X , typename T1 , typename T2 >
bool cgv::base::method_action_2< X, T1, T2 >::call_method ( void(X::*)(T1, T2 mp,
bool  default_result 
)
inline

call a void method given a default return value

Definition at line 171 of file action.h.

Referenced by cgv::base::single_method_action_2< X, R, T1, T2 >::begin().

◆ set_signature()

template<class X , typename T1 , typename T2 >
void cgv::base::method_action_2< X, T1, T2 >::set_signature ( T1  _v1,
T2  _v2 
)
inline

set a new signature with which the methods of the traversed nodes are called

Definition at line 169 of file action.h.

Member Data Documentation

◆ v1

template<class X , typename T1 , typename T2 >
T1 cgv::base::method_action_2< X, T1, T2 >::v1
protected

Definition at line 162 of file action.h.

◆ v2

template<class X , typename T1 , typename T2 >
T2 cgv::base::method_action_2< X, T1, T2 >::v2
protected

Definition at line 163 of file action.h.


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