Classes | Functions
_test_onion.cxx File Reference
#include "WireCellIface/IDepo.h"
#include "WireCellUtil/IComponent.h"
#include "WireCellUtil/Testing.h"
#include <tbb/flow_graph.h>

Go to the source code of this file.

Classes

class  IDepoSource
 
class  IDepoSink
 
class  MyDepoSource
 
class  MyDepoSink
 
class  INode
 
class  ITbbNode
 
class  TbbDepoSource
 
class  TbbDepoSink
 

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 107 of file _test_onion.cxx.

108 {
109  // emulate named factory
111  IDepoSink::pointer dsnk(new MyDepoSink);
112 
114 
115  // emulate lookup of tbb wrapper
116  ITbbNode::pointer tbbsrc(new TbbDepoSource(dsrc));
117  ITbbNode::pointer tbbsnk(new TbbDepoSink(dsnk));
118 
119  tbb::flow::graph_node* gnsrc = tbbsrc->make_node(graph);
120  tbb::flow::graph_node* gnsnk = tbbsnk->make_node(graph);
121  tbbsrc->connect(*gnsrc, *gnsnk);
122 
123  graph.wait_for_all();
124 
125 
126  return 0;
127 }
def graph(desc, maker=maker)
Definition: apa.py:294
std::shared_ptr< Interface > pointer
Definition: Interface.h:16