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

simple action implementation that adds nodes implementing X to a results vector More...

#include <find_action.h>

Inheritance diagram for cgv::base::find_action< X >:
cgv::base::action

Public Member Functions

 find_action (std::vector< X * > &_result)
 
void select (base_ptr p)
 make the passed object current
 
bool begin ()
 perform the enter part of the action on the current object
 
bool implements_action () const
 check if the current object implements the interface needed for this action
 
- 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 traverse_policyget_policy () const
 return the traverse_policy of the current object if available or 0 otherwise
 
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

std::vector< X * > & result
 
- Protected Attributes inherited from cgv::base::action
bool default_result_begin
 
bool default_result_end
 

Detailed Description

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

simple action implementation that adds nodes implementing X to a results vector

Definition at line 10 of file find_action.h.

Constructor & Destructor Documentation

◆ find_action()

template<class X >
cgv::base::find_action< X >::find_action ( std::vector< X * > &  _result)
inline

Definition at line 16 of file find_action.h.

Member Function Documentation

◆ begin()

template<class X >
bool cgv::base::find_action< X >::begin ( )
inlinevirtual

perform the enter part of the action on the current object

Reimplemented from cgv::base::action.

Definition at line 21 of file find_action.h.

◆ implements_action()

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

check if the current object implements the interface needed for this action

Reimplemented from cgv::base::action.

Definition at line 31 of file find_action.h.

◆ select()

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

make the passed object current

Reimplemented from cgv::base::action.

Definition at line 18 of file find_action.h.

Member Data Documentation

◆ result

template<class X >
std::vector<X*>& cgv::base::find_action< X >::result
protected

Definition at line 14 of file find_action.h.


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