[Paraview] help: problem about message passing in paraview

Berk Geveci berk.geveci at gmail.com
Fri Jun 3 11:35:50 EDT 2005


OpenCallback() and other functions similar to it eventually lead to calling
vtkPVSource *vtkPVWindow::CreatePVSource();

This function, through a cloning process (which I am proud of
writing), instantiate and populate with right widgets a vtkPVSource.
The widgets that are added to vtkPVSource are created and set up using
an xml file in GUI/Client/Resources/.
These widgets are the ones that make calls on the server manager. For
example, you can look at vtkPVVectorEntry. There is some seriously
hard-to-follow code in there. Hopefully, it will be cleaned one day.

-Berk

On 6/1/05, Nancy <haifang_zhou at 163.com> wrote:
> Dear Berk,
> 
> 
> 
> At first, thanks for your answers!
> 
> In the three steps you described:
> 
> "1. The gui elements make calls on an (C++) API called "server manager"
> 2. The server manager translates these into a stream that can be sent
>   over the network
> 3. An interpreter receives these streams, parses them and converts
>   them into C++ calls."
> 
> I have found the related source code for the second and third step, but I still could not find out that how the gui elements calls are passed to "server manager".
> 
> For example, when I choose the gui item "open data" in the "File" menu, the related processing source code is
> 
> "this->MenuFile->InsertCommand(
> 
> clidx++, VTK_PV_OPEN_DATA_MENU_LABEL, this, "OpenCallback",0);"
> 
> 
> 
> And I also find the code that interpreter parses this stream as:
> 
> "int VTKTCL_EXPORT vtkPVWindowCppCommand(vtkPVWindow *op, Tcl_Interp *interp,
> 
>              int argc, char *argv[])
> 
> {
> 
> 
> 
> ...
> 
> if ((!strcmp("OpenCallback",argv[1]))&&(argc == 2))
> 
>     {
> 
>     op->OpenCallback();
> 
>     Tcl_ResetResult(interp);
> 
>     return TCL_OK;
> 
> }
> 
> ....
> 
> }"
> 
> 
> 
> BUT, I can not find the trace from gui element to server manager, that is the first step.
> 
> Can you explain this process for me using this example?
> 
> Please forgive my stupid, but I am indeed need some help.
> 
> 
> 
> Best,
> 
> Nancy
> 
> 
> 
> ----- Original Message -----
> From: "Berk Geveci" <berk.geveci at gmail.com>
> To: "Nancy" <haifang_zhou at 163.com>
> Cc: <paraview at paraview.org>
> Sent: Tuesday, May 31, 2005 11:22 PM
> Subject: Re: [Paraview] help: problem about message passing in paraview
> 
> 
> The paraview architecture is a wee bit to complicated to describe in
> an e-mail. The ParaView Guide explains it some. In short:
> 
> 1. The gui elements make calls on an (C++) API called "server manager"
> 2. The server manager translates these into a stream that can be sent
> over the network
> 3. An interpreter receives these streams, parses them and converts
> them into C++ calls.
> 
> Instead of using something like CORBA, we developed a very simple and
> light layer that is automatically generated at compile time (generated
> pretty much the same way Tcl, Python and Java wrappers are generated
> for VTK automatically).
> 
> -Berk
> 
> On 5/30/05, Nancy <haifang_zhou at 163.com> wrote:
> > Hi, all,
> >      I am reading the source code of paraview, and want to understand the message passing scheme in paraview.
> > For example, when I push a button or choose an item in the menu on the client GUI, how this event is passed to the final related processing Class object?
> > I can only find the begin end of the source code (e.g. create a menu item) and the final class of processing (e.g. a reader/source class), but I can not track the message passing process between the begin end and final methods of related class.
> >     Who can give me an answer?   Thanks for any help!
> >
> > Best,
> > Nancy
> >
> > _______________________________________________
> > ParaView mailing list
> > ParaView at paraview.org
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
> >
> 
>


More information about the ParaView mailing list