[Paraview] compilation error

Rakesh Hammond rakesh.hammond at googlemail.com
Sun Nov 2 09:54:54 EST 2008


Thanks - that was one of them annoying errors !

I would like vtkMyFancyReader to create an instance of another class, say
myReader.h which doesn't extend from a vtkClass - how would I create this
class?

Can i add myReader.cxx as SOURCE in the CMake below?

ADD_PARAVIEW_PLUGIN(MyFancyReader "1.0"
             SERVER_MANAGER_XML readers.xml
             SERVER_MANAGER_SOURCES vtkMyFancyReader.cxx
             SOURCES vtkReader.cxx
               GUI_RESOURCES pqReader.qrc
               )

This compiles, but is this the write way to go?  My confusion is that,
myReader.h also need reside on the server ( i assume?), but I don't think I
need to extend it from a vtkClass as I don't any functionalities from it -

What I do need is be able to do the following in vtkMyFancyReader.cxx

myReader reader = new myReader();
reader.doSomething();

what is the correct way to go about it?

Thanks,
Rakesh
2008/11/2 Berk Geveci <berk.geveci at kitware.com>

> I believe the wrapper code that generates the ClientServer bindings
> requires that your class name start with vtk. Try changing it to
> vtkMyFancyReader.
>
> -berk
>
> On Sat, Nov 1, 2008 at 5:34 PM, Rakesh Hammond
> <rakesh.hammond at googlemail.com> wrote:
> > Dear all,
> >
> > I am trying to write my first plugin reader and trying to follow the
> > examples on the wiki.
> > I am stuck with annoying syntax error, which I can't seem to understand
> > where its coming from - can some one tell me where I am going wrong
> please?
> >
> > Here is my top bit of the header file, where the error is being generated
> >
> > class VTK_EXPORT myFancyReader : public vtMultiBlockDataSetAlgorithm {
> >     public:
> >         static myFancyReader* New();
> > };
> > #endif
> >
> > apparently there is a syntax error at the line where it begins with class
> -
> > when its trying to generate myFancyReaderClientServer.cxx
> >
> > My CMakeLists.txt is
> >     ADD_PARAVIEW_PLUGIN(MyReader "1.0"
> >                SERVER_MANAGER_XML readers.xml
> >                GUI_RESOURCES pqReader.qrc
> >                SERVER_MANAGER_SOURCES myFancyReader.cxx
> >                )
> >
> > Thanks very much,
> > Rakesh
> >
> > _______________________________________________
> > ParaView mailing list
> > ParaView at paraview.org
> > http://www.paraview.org/mailman/listinfo/paraview
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20081102/aae294aa/attachment-0001.htm>


More information about the ParaView mailing list