Sometimes we wish to combine two or more streams of data. There are
two many combinations of inputs and output, passive and active inputs,
to support directly, however some simple cases are provided
for. Implementing other more complex combinations for a specific
application is not complicated. As before both the use of simple
functions and processes based on classes are supported. The wrappers
of multiple argument processes are show in Figure 5
and Figure 6.
2 Argument process
3 Argument process
The following example is not as elegant as previous examples, as the
two input streams are setup separately to aid clarity. Figure
7 shows the pipelines created.
Example of a 2 input process.
DPIPortC<RealT> src2 = DPIFileC<RealT>("in2.dat") >> DPOffsetScale(2.0,3.0);
DPIStreamOp21C<IntT,RealT,RealT>(MyComibinationProcC("some parameters"),src1,src2) >> DPOffsetScale(5.0,2.0) >>= DPIFileC<RealT>("out.dat");