MeshLib C++ Docs
Loading...
Searching...
No Matches
MRSignalCombiners.h
Go to the documentation of this file.
1
#pragma once
2
3
namespace
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.
7
struct
StopOnTrueCombiner
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
}
MR
MR::StopOnTrueCombiner
Definition
MRSignalCombiners.h:8
MR::StopOnTrueCombiner::operator()
bool operator()(Iter first, Iter last) const
Definition
MRSignalCombiners.h:12
MR::StopOnTrueCombiner::result_type
bool result_type
Definition
MRSignalCombiners.h:9
MeshLib
source
MRViewer
MRSignalCombiners.h
Generated by
1.11.0