Public Types | Public Member Functions | List of all members
WireCell::Fanin< Collection > Struct Template Reference

#include <Faninout.h>

Public Types

typedef Collection result_type
 

Public Member Functions

template<typename InputIterator >
result_type operator() (InputIterator first, InputIterator last) const
 

Detailed Description

template<typename Collection>
struct WireCell::Fanin< Collection >

Fan-in concept is inherent in boost::signals2, but does require some "combiner" to enact whatever fan-in policy is desired. This most obvious one is one which synchronizes all input into a simple collection. A signal like this will return a vector of its inputs.

// a generator returning one higher count each time called Counter c1(10),c2(20),c3(30);

boost::signals2::signal< int (), Fanin< std::vector<int> > > sig; sig.connect(c1); sig.connect(c2); sig.connect(c3);

sig(); // –> vector(10,20,30)

Definition at line 105 of file Faninout.h.

Member Typedef Documentation

template<typename Collection >
typedef Collection WireCell::Fanin< Collection >::result_type

Definition at line 107 of file Faninout.h.

Member Function Documentation

template<typename Collection >
template<typename InputIterator >
result_type WireCell::Fanin< Collection >::operator() ( InputIterator  first,
InputIterator  last 
) const
inline

Definition at line 111 of file Faninout.h.

111  {
112  result_type ret;
113  while (first != last) {
114  ret.push_back(*first);
115  ++first;
116  }
117  return ret;
118  }
Collection result_type
Definition: Faninout.h:107

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