Public Member Functions | List of all members
Func Class Reference
Inheritance diagram for Func:
IdNode WireCell::Pgraph::Node

Public Member Functions

 Func (int id)
 
virtual bool operator() ()
 
- Public Member Functions inherited from IdNode
 IdNode (const std::string &name, int id, size_t nin=0, size_t nout=0)
 
int id ()
 
virtual std::string ident ()
 
std::ostream & msg (const std::string s)
 
virtual bool ready ()
 
- 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 ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 170 of file test_pipegraph.cxx.

Constructor & Destructor Documentation

Func::Func ( int  id)
inline

Definition at line 173 of file test_pipegraph.cxx.

173 : IdNode("fun", id, 1, 1) {}
IdNode(const std::string &name, int id, size_t nin=0, size_t nout=0)

Member Function Documentation

virtual bool Func::operator() ( void  )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 174 of file test_pipegraph.cxx.

174  {
175  if (iport().empty()) {
176  return false;
177  }
178  Pgraph::Data out = iport().get();
179  int d = boost::any_cast<int>(out);
180  msg("func: ") << d << std::endl;
181  oport().put(out);
182  return true;
183  }
Data get(bool pop=true)
Definition: Port.cxx:43
Port & iport(size_t ind=0)
Definition: Node.h:22
boost::any Data
Definition: Port.h:19
void put(Data &data)
Definition: Port.cxx:62
std::ostream & msg(const std::string s)
Port & oport(size_t ind=0)
Definition: Node.h:25
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:92
QTextStream & endl(QTextStream &s)

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