Public Types | Public Member Functions | Private Attributes | List of all members
WireCell::Addresser< Data, Address > Class Template Reference

#include <Faninout.h>

Public Types

typedef Data value_type
 
typedef Address address_type
 
typedef boost::signals2::signal< value_type(const address_type &addr)> signal
 
typedef signal::slot_type slot
 

Public Member Functions

 Addresser (const address_type &addr)
 
void connect (const slot &s)
 
value_type operator() ()
 

Private Attributes

Address m_addr
 
signal m_signal
 

Detailed Description

template<typename Data, typename Address = int>
class WireCell::Addresser< Data, Address >

If you have a slot to connect to a Fanout which doesn't inherently care about the address to which it is attached, use the AddressedShunt as a go-between.

Definition at line 61 of file Faninout.h.

Member Typedef Documentation

template<typename Data, typename Address = int>
typedef Address WireCell::Addresser< Data, Address >::address_type

Definition at line 64 of file Faninout.h.

template<typename Data, typename Address = int>
typedef boost::signals2::signal<value_type (const address_type& addr)> WireCell::Addresser< Data, Address >::signal

Definition at line 67 of file Faninout.h.

template<typename Data, typename Address = int>
typedef signal::slot_type WireCell::Addresser< Data, Address >::slot

Definition at line 69 of file Faninout.h.

template<typename Data, typename Address = int>
typedef Data WireCell::Addresser< Data, Address >::value_type

Definition at line 63 of file Faninout.h.

Constructor & Destructor Documentation

template<typename Data, typename Address = int>
WireCell::Addresser< Data, Address >::Addresser ( const address_type addr)
inline

Definition at line 71 of file Faninout.h.

71 : m_addr(addr) {}
constexpr std::enable_if_t< are_cv_compatible< TO, FROM >::value, std::add_pointer_t< std::remove_pointer_t< TO > > > addr(FROM &from)
Definition: ensurePointer.h:35

Member Function Documentation

template<typename Data, typename Address = int>
void WireCell::Addresser< Data, Address >::connect ( const slot s)
inline

Definition at line 74 of file Faninout.h.

74 { m_signal.connect(s); }
static QCString * s
Definition: config.cpp:1042
template<typename Data, typename Address = int>
value_type WireCell::Addresser< Data, Address >::operator() ( void  )
inline

Definition at line 77 of file Faninout.h.

77  {
78  return *m_signal(m_addr);
79  }

Member Data Documentation

template<typename Data, typename Address = int>
Address WireCell::Addresser< Data, Address >::m_addr
private

Definition at line 82 of file Faninout.h.

template<typename Data, typename Address = int>
signal WireCell::Addresser< Data, Address >::m_signal
private

Definition at line 83 of file Faninout.h.


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