Public Types | Public Member Functions | Private Attributes | List of all members
WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor > Class Template Reference

#include <SSSSAdapter.h>

Public Types

typedef boost::signals2::signal< InputType()> signal_type
 
typedef signal_type::slot_type input_slot_type
 

Public Member Functions

 SigSlotSinkSourceAdapter (Processor &proc)
 
OutputType operator() ()
 
void connect (const input_slot_type &s)
 

Private Attributes

Processor & m_proc
 
signal_type m_input
 

Detailed Description

template<typename InputType, typename OutputType, class Processor>
class WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >

An adapter which drives the push-pull sink/process/source paradigm to the pure-pull signal/slot execution model.

Definition at line 10 of file SSSSAdapter.h.

Member Typedef Documentation

template<typename InputType , typename OutputType , class Processor >
typedef signal_type::slot_type WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::input_slot_type

Definition at line 13 of file SSSSAdapter.h.

template<typename InputType , typename OutputType , class Processor >
typedef boost::signals2::signal<InputType ()> WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::signal_type

Definition at line 12 of file SSSSAdapter.h.

Constructor & Destructor Documentation

template<typename InputType , typename OutputType , class Processor >
WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::SigSlotSinkSourceAdapter ( Processor &  proc)
inline

Definition at line 15 of file SSSSAdapter.h.

15 : m_proc(proc) {}

Member Function Documentation

template<typename InputType , typename OutputType , class Processor >
void WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::connect ( const input_slot_type s)
inline

Definition at line 26 of file SSSSAdapter.h.

26 { m_input.connect(s); }
static QCString * s
Definition: config.cpp:1042
template<typename InputType , typename OutputType , class Processor >
OutputType WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::operator() ( void  )
inline

Definition at line 17 of file SSSSAdapter.h.

17  {
18  InputType input = m_proc();
19  m_proc.sink(input);
20 
21  OutputType ot;
22  m_proc.source(ot);
23  return ot;
24  }
static int input(void)
Definition: code.cpp:15695

Member Data Documentation

template<typename InputType , typename OutputType , class Processor >
signal_type WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::m_input
private

Definition at line 30 of file SSSSAdapter.h.

template<typename InputType , typename OutputType , class Processor >
Processor& WireCell::SigSlotSinkSourceAdapter< InputType, OutputType, Processor >::m_proc
private

Definition at line 29 of file SSSSAdapter.h.


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