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>&nbsp;<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">&lt;<a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt;</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>
 &nbsp;MESSAGE (STATUS &quot;Compiling PVDislocation into Paraview 3.x&quot;)<br>
 &nbsp;#-- Invoke this Macro to add the sources to paraview and<br>
 &nbsp;#-- wrap them for the client server<br>
 &nbsp;PARAVIEW_INCLUDE_WRAPPED_SOURCES (&quot;${PVDislocation_WRAPPED_SRCS}&quot;)<br>
<br>
 &nbsp;#-- Invoke this macro to include non-wrapped sources in the build<br>
 &nbsp;PARAVIEW_INCLUDE_SOURCES(&quot;${PVDislocation_SRCS}&quot;)<br>
 &nbsp;# -- Add the Server Manager XML<br>
 &nbsp;# Place the package configuration file into the build tree.<br>
 &nbsp;CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_Filters_GUI.xml<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_Filters.xml @ONLY IMMEDIATE)<br>
<br>
 &nbsp;CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_GUI.xml<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.xml @ONLY IMMEDIATE)<br>
<br>
 &nbsp;# Place the package configuration file into the build tree.<br>
 &nbsp;CONFIGURE_FILE(${PVDislocation_SOURCE_DIR}/PV3-xml/${MODULE_NAME}_PVSM.xml<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.pvsm @ONLY IMMEDIATE)<br>
<br>
 &nbsp;# -- Add the Server Manager XML<br>
 &nbsp;PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES(${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.pvsm)<br>
 &nbsp;# -- Add the Client side xml<br>
 &nbsp;PARAVIEW_INCLUDE_GUI_RESOURCES(&quot;${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}.xml&quot;)<br>
 &nbsp;PARAVIEW_INCLUDE_GUI_RESOURCES(&quot;${LIBRARY_OUTPUT_PATH}/${MODULE_NAME}_Filters.xml&quot;)<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&#39;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 &quot;1.0&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SERVER_MANAGER_XML readers.xml<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SERVER_MANAGER_SOURCES vtkMyFancyReader.cxx<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SOURCES vtkReader.cxx<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GUI_RESOURCES pqReader.qrc<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>
<br>
This compiles, but is this the write way to go? &nbsp;My confusion is that, myReader.h also need reside on the server ( i assume?), but I don&#39;t think I need to extend it from a vtkClass as I don&#39;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 &lt;<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>&gt;<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>
&lt;<a href="mailto:rakesh.hammond@googlemail.com" target="_blank">rakesh.hammond@googlemail.com</a>&gt; wrote:<br>
&gt; Dear all,<br>
&gt;<br>
&gt; I am trying to write my first plugin reader and trying to follow the<br>
&gt; examples on the wiki.<br>
&gt; I am stuck with annoying syntax error, which I can&#39;t seem to understand<br>
&gt; where its coming from - can some one tell me where I am going wrong please?<br>
&gt;<br>
&gt; Here is my top bit of the header file, where the error is being generated<br>
&gt;<br>
&gt; class VTK_EXPORT myFancyReader : public vtMultiBlockDataSetAlgorithm {<br>
&gt; &nbsp; &nbsp; public:<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; static myFancyReader* New();<br>
&gt; };<br>
&gt; #endif<br>
&gt;<br>
&gt; apparently there is a syntax error at the line where it begins with class -<br>
&gt; when its trying to generate myFancyReaderClientServer.cxx<br>
&gt;<br>
&gt; My CMakeLists.txt is<br>
&gt; &nbsp; &nbsp; ADD_PARAVIEW_PLUGIN(MyReader &quot;1.0&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SERVER_MANAGER_XML readers.xml<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GUI_RESOURCES pqReader.qrc<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SERVER_MANAGER_SOURCES myFancyReader.cxx<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;)<br>
&gt;<br>
&gt; Thanks very much,<br>
&gt; Rakesh<br>
&gt;<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>