MeshLib Documentation
Loading...
Searching...
No Matches
MRSignalCombiners.h
Go to the documentation of this file.
1#pragma once
2
3namespace MR
4{
5
6// Pass this as a second template argument to `boost::signals2::signal<...>` to stop the execution of handlers when one of them returns true.
8{
9 using result_type = bool;
10
11 template<typename Iter>
12 bool operator()( Iter first, Iter last ) const
13 {
14 while ( first != last )
15 {
16 if ( *first )
17 return true; // The execution of slots stops if one returns true.
18 ++first;
19 }
20 return false;
21 }
22};
23
24}
Definition MRCameraOrientationPlugin.h:8
Definition MRSignalCombiners.h:8
bool operator()(Iter first, Iter last) const
Definition MRSignalCombiners.h:12
bool result_type
Definition MRSignalCombiners.h:9