Public Member Functions | Private Attributes | List of all members
WireCellTbb::JoinWrapper Class Reference

#include <JoinCat.h>

Inheritance diagram for WireCellTbb::JoinWrapper:
WireCellTbb::NodeWrapper

Public Member Functions

 JoinWrapper (tbb::flow::graph &graph, WireCell::INode::pointer wcnode)
 
virtual receiver_port_vector receiver_ports ()
 
virtual sender_port_vector sender_ports ()
 
- Public Member Functions inherited from WireCellTbb::NodeWrapper
virtual ~NodeWrapper ()
 
virtual void initialize ()
 

Private Attributes

tbb::flow::graph_node * m_joiner
 
tbb::flow::graph_node * m_caller
 
receiver_port_vector m_receiver_ports
 

Detailed Description

Definition at line 59 of file JoinCat.h.

Constructor & Destructor Documentation

WireCellTbb::JoinWrapper::JoinWrapper ( tbb::flow::graph &  graph,
WireCell::INode::pointer  wcnode 
)
inline

Definition at line 65 of file JoinCat.h.

66  : m_joiner(0), m_caller(0)
67  {
68  int nin = wcnode->input_types().size();
69  // an exhaustive switch to convert from run-time to compile-time types and enumerations.
70  Assert (nin > 0 && nin <= 3); // fixme: exception instead?
71  if (1 == nin) m_receiver_ports = build_joiner<1>(graph, wcnode, m_joiner, m_caller);
72  if (2 == nin) m_receiver_ports = build_joiner<2>(graph, wcnode, m_joiner, m_caller);
73  if (3 == nin) m_receiver_ports = build_joiner<3>(graph, wcnode, m_joiner, m_caller);
74  }
tbb::flow::graph_node * m_joiner
Definition: JoinCat.h:60
tbb::flow::graph_node * m_caller
Definition: JoinCat.h:60
def graph(desc, maker=maker)
Definition: apa.py:294
receiver_port_vector m_receiver_ports
Definition: JoinCat.h:61
#define Assert
Definition: Testing.h:7

Member Function Documentation

virtual receiver_port_vector WireCellTbb::JoinWrapper::receiver_ports ( )
inlinevirtual

Reimplemented from WireCellTbb::NodeWrapper.

Definition at line 76 of file JoinCat.h.

76  {
77  return m_receiver_ports;
78  }
receiver_port_vector m_receiver_ports
Definition: JoinCat.h:61
virtual sender_port_vector WireCellTbb::JoinWrapper::sender_ports ( )
inlinevirtual

Reimplemented from WireCellTbb::NodeWrapper.

Definition at line 80 of file JoinCat.h.

80  {
81  auto ptr = dynamic_cast< sender_type* >(m_caller);
82  return sender_port_vector{ptr};
83  }
tbb::flow::graph_node * m_caller
Definition: JoinCat.h:60
std::vector< sender_port_pointer > sender_port_vector
const void * ptr(const T *p)
Definition: format.h:3138
tbb::flow::sender< boost::any > sender_type

Member Data Documentation

tbb::flow::graph_node * WireCellTbb::JoinWrapper::m_caller
private

Definition at line 60 of file JoinCat.h.

tbb::flow::graph_node* WireCellTbb::JoinWrapper::m_joiner
private

Definition at line 60 of file JoinCat.h.

receiver_port_vector WireCellTbb::JoinWrapper::m_receiver_ports
private

Definition at line 61 of file JoinCat.h.


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