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

#include <Wrappers.h>

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

Public Member Functions

 Source (INode::pointer wcnode)
 
virtual ~Source ()
 
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

ISourceNodeBase::pointer m_wcnode
 
bool m_ok
 

Additional Inherited Members

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

Detailed Description

Definition at line 80 of file Wrappers.h.

Constructor & Destructor Documentation

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

Definition at line 84 of file Wrappers.h.

84  : PortedNode(wcnode), m_ok(true) {
85  m_wcnode = std::dynamic_pointer_cast<ISourceNodeBase>(wcnode);
86  }
ISourceNodeBase::pointer m_wcnode
Definition: Wrappers.h:81
PortedNode(INode::pointer wcnode)
Definition: Wrappers.h:40
virtual WireCell::Pgraph::Source::~Source ( )
inlinevirtual

Definition at line 87 of file Wrappers.h.

87 {}

Member Function Documentation

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

Implements WireCell::Pgraph::Node.

Definition at line 89 of file Wrappers.h.

89  {
90  Port& op = oport();
91  if (op.size()) {
92  return false; // don't call me if I've got existing output waiting
93  }
94 
95  boost::any obj;
96  m_ok = (*m_wcnode)(obj);
97  if (!m_ok) {
98  return false;
99  }
100  oport().put(obj);
101  return true;
102  }
void put(Data &data)
Definition: Port.cxx:62
Port & oport(size_t ind=0)
Definition: Node.h:25

Member Data Documentation

bool WireCell::Pgraph::Source::m_ok
private

Definition at line 82 of file Wrappers.h.

ISourceNodeBase::pointer WireCell::Pgraph::Source::m_wcnode
private

Definition at line 81 of file Wrappers.h.


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