Public Member Functions | Private Attributes | List of all members
WireCell::Pgraph::Sink Class Reference

#include <Wrappers.h>

Inheritance diagram for WireCell::Pgraph::Sink:
WireCell::Pgraph::PortedNode WireCell::Pgraph::Node

Public Member Functions

 Sink (INode::pointer wcnode)
 
virtual ~Sink ()
 
virtual bool operator() ()
 
- Public Member Functions inherited from WireCell::Pgraph::PortedNode
 PortedNode (INode::pointer wcnode)
 
virtual std::string ident ()
 
- Public Member Functions inherited from WireCell::Pgraph::Node
 Node ()
 
virtual ~Node ()
 
Portiport (size_t ind=0)
 
Portoport (size_t ind=0)
 
PortListinput_ports ()
 
PortListoutput_ports ()
 
Portport (Port::Type type, size_t ind=0)
 
Portport (Port::Type type, const std::string &name)
 
bool connected ()
 

Private Attributes

ISinkNodeBase::pointer m_wcnode
 

Additional Inherited Members

- Protected Attributes inherited from WireCell::Pgraph::Node
PortList m_ports [Port::ntypes]
 

Detailed Description

Definition at line 105 of file Wrappers.h.

Constructor & Destructor Documentation

WireCell::Pgraph::Sink::Sink ( INode::pointer  wcnode)
inline

Definition at line 108 of file Wrappers.h.

108  : PortedNode(wcnode) {
109  m_wcnode = std::dynamic_pointer_cast<ISinkNodeBase>(wcnode);
110  }
ISinkNodeBase::pointer m_wcnode
Definition: Wrappers.h:106
PortedNode(INode::pointer wcnode)
Definition: Wrappers.h:40
virtual WireCell::Pgraph::Sink::~Sink ( )
inlinevirtual

Definition at line 111 of file Wrappers.h.

111 {}

Member Function Documentation

virtual bool WireCell::Pgraph::Sink::operator() ( void  )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 112 of file Wrappers.h.

112  {
113  Port& ip = iport();
114  if (ip.empty()) {
115  return false; // don't call me if there is nothing to give me.
116  }
117  auto obj = ip.get();
118  bool ok = (*m_wcnode)(obj);
119  //std::cerr << "Sink returns: " << ok << std::endl;
120  return ok;
121  }
Port & iport(size_t ind=0)
Definition: Node.h:22
virtual bool get(port_type &out) const
Definition: test_typeid.cxx:42

Member Data Documentation

ISinkNodeBase::pointer WireCell::Pgraph::Sink::m_wcnode
private

Definition at line 106 of file Wrappers.h.


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