Boost logo

Boost :

From: Stjepan Rajko (stipe_at_[hidden])
Date: 2007-11-12 17:44:39

Hi John,

On Nov 12, 2007 2:19 AM, John Torjo <john.groups_at_[hidden]> wrote:
> I guess I'm a bit short sighted, because in my mind, the process should
> be *extremely* simple:

I agree :-)

> There would be a "processor" - to which you pass this data.
> The processor passes this to the left-most component (that is, the one
> that processes the first input).
> The left-most component processes it - lets say, in its operator(). When
> operator() finishes, the left-most component has processed the input and
> has generated one or more outputs.
> The processor will take those output(s), and pass them on, to the next
> components, and so on.

Although the library currently provides no mechanisms of its own (it
just provides a generic layer that could support to some extent a
variety of actual data transport mechanisms, and a developed
Boost.Signals layer that comes with a bunch of components), a simple
example mechanism like this would be interesting to add, and doing so
would probably also force the generic layer to expand in good ways.
Let me see if I can throw together something like this.

> Connecting the "dots" should be *extremely* simple.
> (note: I don't really understand why you make usage of
> DATAFLOW_PORT_TRAITS... and other macros).

Yes, the macros are very poorly explained :-( . Basically, (and this
should be elaborated in the docs), the VTK example is focused on how
you go about providing support for the VTK mechanism (i.e., that code
just needs to be written once). After that's included, connecting the
dots is (I hope) simple, i.e. you just do:

#include "vtk_dataflow_support.hpp" // this include file is
"operators.hpp" in the VTK examples

// ... function scope:

// get some VTK components
vtkConeSource *cone = vtkConeSource::New();
vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
vtkActor *coneActor = vtkActor::New();
vtkRenderer *ren1= vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();

// and now connect:
*cone >>= *coneMapper >>= *coneActor >>= *ren1 >>= *renWin;

// or, connect this way
connect(cone, coneMapper);
connect(coneMapper, coneActor);
connect(coneActor, ren1);
connect(ren1, renWin);

The docs do need a lot of work... :-)

Thanks for your comments!


Boost list run by bdawes at, gregod at, cpdaniel at, john at