Hmm, sounds far too complicated !<br><br>Would it be a crime just to extend from a VTK class instead but not make any use of the methods within the superclass?<br><br>I was wondering if I could do something similar to the example shown on the wiki<br>
<a href="http://paraview.org/Wiki/Plugin_Examples">http://paraview.org/Wiki/Plugin_Examples</a><br><br>That aside, what is the meaning of VTK_EXPORT in the definition below?<br> <br>class VTK_EXPORT vtkMyFancyReader : public vtkMultiBlockDataSetAlgorithm<br>
<br>I also see VTK_FILTERING_EXPORT<br><br>Thanks,<br>Rakesh <br><div class="gmail_quote">2008/11/2 Michael Jackson <span dir="ltr"><<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I use the technique of compiling my sources into paraview as I build ParaView so I do something like:<br>
<br>
<br>
MESSAGE (STATUS "Compiling PVDislocation into Paraview 3.x")<br>
#-- Invoke this Macro to add the sources to paraview and<br>
#-- wrap them for the client server<br>
PARAVIEW_INCLUDE_WRAPPED_SOURCES ("${PVDislocation_WRAPPED_SRCS}")<br>
<br>
#-- Invoke this macro to include non-wrapped sources in the build<br>
PARAVIEW_INCLUDE_SOURCES("${PVDislocation_SRCS}")<br>
# -- Add the Server Manager XML<br>
# Place the package configuration file into the build tree.<br>
CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_Filters_GUI.xml<br>
${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_Filters.xml @ONLY IMMEDIATE)<br>
<br>
CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_GUI.xml<br>
${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.xml @ONLY IMMEDIATE)<br>
<br>
# Place the package configuration file into the build tree.<br>
CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_PVSM.xml<br>
${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.pvsm @ONLY IMMEDIATE)<br>
<br>
# -- Add the Server Manager XML<br>
PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES(${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.pvsm)<br>
# -- Add the Client side xml<br>
PARAVIEW_INCLUDE_GUI_RESOURCES("${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.xml")<br>
PARAVIEW_INCLUDE_GUI_RESOURCES("${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_Filters.xml")<br>
<br>
So you need something similar in your CMakeLists.txt file<br>
<br>
Mike<div><div></div><div class="Wj3C7c"><br>
<br>
On Nov 2, 2008, at 9:54 AM, Rakesh Hammond wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thanks - that was one of them annoying errors !<br>
<br>
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?<br>
<br>
Can i add myReader.cxx as SOURCE in the CMake below?<br>
<br>
ADD_PARAVIEW_PLUGIN(MyFancyReader "1.0"<br>
SERVER_MANAGER_XML readers.xml<br>
SERVER_MANAGER_SOURCES vtkMyFancyReader.cxx<br>
SOURCES vtkReader.cxx<br>
GUI_RESOURCES pqReader.qrc<br>
)<br>
<br>
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 -<br>
<br>
What I do need is be able to do the following in vtkMyFancyReader.cxx<br>
<br>
myReader reader = new myReader();<br>
reader.doSomething();<br>
<br>
what is the correct way to go about it?<br>
<br>
Thanks,<br>
Rakesh<br>
2008/11/2 Berk Geveci <<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>><br>
I believe the wrapper code that generates the ClientServer bindings<br>
requires that your class name start with vtk. Try changing it to<br>
vtkMyFancyReader.<br>
<br>
-berk<br>
<br>
On Sat, Nov 1, 2008 at 5:34 PM, Rakesh Hammond<br>
<<a href="mailto:rakesh.hammond@googlemail.com" target="_blank">rakesh.hammond@googlemail.com</a>> wrote:<br>
> Dear all,<br>
><br>
> I am trying to write my first plugin reader and trying to follow the<br>
> examples on the wiki.<br>
> I am stuck with annoying syntax error, which I can't seem to understand<br>
> where its coming from - can some one tell me where I am going wrong please?<br>
><br>
> Here is my top bit of the header file, where the error is being generated<br>
><br>
> class VTK_EXPORT myFancyReader : public vtMultiBlockDataSetAlgorithm {<br>
> public:<br>
> static myFancyReader* New();<br>
> };<br>
> #endif<br>
><br>
> apparently there is a syntax error at the line where it begins with class -<br>
> when its trying to generate myFancyReaderClientServer.cxx<br>
><br>
> My CMakeLists.txt is<br>
> ADD_PARAVIEW_PLUGIN(MyReader "1.0"<br>
> SERVER_MANAGER_XML readers.xml<br>
> GUI_RESOURCES pqReader.qrc<br>
> SERVER_MANAGER_SOURCES myFancyReader.cxx<br>
> )<br>
><br>
> Thanks very much,<br>
> Rakesh<br>
><br>
</blockquote>
<br>
_______________________________________________<br>
ParaView mailing list<br>
<a href="mailto:ParaView@paraview.org" target="_blank">ParaView@paraview.org</a><br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br>