libsigc++ 3.6.0
Static Public Member Functions | List of all members
sigc::visitor< T_functor > Struct Template Reference

sigc::visitor<T_functor>::do_visit_each() performs a functor on each of the targets of a functor. More...

#include <sigc++/visit_each.h>

Static Public Member Functions

template <typename T_action >
static void do_visit_each (const T_action &action, const T_functor &functor)
 

Detailed Description

template <typename T_functor>
struct sigc::visitor< T_functor >

sigc::visitor<T_functor>::do_visit_each() performs a functor on each of the targets of a functor.

All unknown types just call action on them. Add specializations that specialize the T_functor argument for your own functor types, so that subobjects get visited. This is needed to enable auto-disconnection support for your functor types.

Example:
namespace some_ns
{
struct some_functor
{
void operator()() {}
some_possibly_sigc_trackable_derived_type some_data_member;
some_other_functor_type some_other_functor;
};
}
namespace sigc
{
template <>
struct visitor<some_ns::some_functor>
{
template <typename T_action>
static void do_visit_each(const T_action& action,
const some_ns::some_functor& target)
{
sigc::visit_each(action, target.some_data_member);
sigc::visit_each(action, target.some_other_functor);
}
};
}
decltype(auto) ptr_fun(T_return(*func)(T_args...))
Creates a functor of type sigc::pointer_functor which wraps an existing non-member function.
Definition ptr_fun.h:107
void visit_each(const T_action &action, const T_functor &functor)
This function performs a functor on each of the targets of a functor.
Definition visit_each.h:130
The libsigc++ namespace.
Definition connection.h:25

Member Function Documentation

◆ do_visit_each()

template <typename T_functor >
template <typename T_action >
static void sigc::visitor< T_functor >::do_visit_each ( const T_action action,
const T_functor &  functor 
)
inlinestatic
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy