[Paraview] Are GetMacro/SetMacro Necessary for Source Modules?
Andy Cedilnik
andy . cedilnik at kitware . com
17 Jul 2003 15:28:05 -0400
Hi Daniel,
ParaView just calls tcl method something like:
("%s Set%s %d", source->GetTclName(), method, value);
So, if your source is vtkSphereSource vtkTemp634 and your method is
ThetaResolution, then the call will look like this:
vtkTemp634 SetThetaResolution 100
That means you do not have to use set/get macros. That said, make sure
that things will get wrapped (no //BTX//ETX) and that the arguments are
in the right format:
set macro creates:
virtual void SetMethod(type value);
get macro creates:
virtual type GetMethod();
What do you mean by XML definitions for the modules?
Andy
On Thu, 2003-07-17 at 15:11, godach at juno . com wrote:
> This is probably a dumb question, but as I am currently in the processs
> of writing a source module, I wonder if it is necessary to write a set
> of macro functions for each member attribute. Or can I just write my
> own setXXX/getXXX functions? In fact, I am curious how the modules work:
> When Parview users change the attributes of a source, does Paraview
> call the corresponding setMacro functions and call the Execute/Update
> function upon clicking "Accept"?
>
> And I am also curious if the XML definitions for the modules are
> available online, or could anyone kindly point out the files in the
> src that contains such info?
>
> Thanks for your help!