[vtkusers] Labeling classes with which library is necessary to use them

Andrew Maclean andrew.amaclean at gmail.com
Wed Oct 14 00:37:41 EDT 2009


Firstly it is an interesting idea but upon further thought  have two comments.

1) This shows the importance of testing! So having a test example
pinpointed this problem for you and you were able to fix it!

2) A while back there was a major clean up of VTK to reduce multiple
includes and make the structure much clearer. Another object of this
cleanup was to only include necessary headers in the classes.
Initially it caused a little angst because we (users) often forgot to
specifically include files because they were included somewhere else.
So what used to work, didn't work, and we then had to specifically
include the headers we need.  The downside is as you found out. Having
said all this, you get used it and it also makes you more aware of the
library structure. One problem I could see with what you are proposing
is that it would be very difficult to maintain it. For example if you
have a class A that inherits from other classes say B, C, D, and you
add a new class E that D inherits from then it becomes a nightmare
hunting through the classes to document this sort of thing.

I don't know of any automated way of doing this sort of thing. Maybe
someone else does.

Regards
   Andrew


On Wed, Oct 14, 2009 at 12:41 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> As an example:
>
> I found a class to find the minimum spanning tree on a graph:
> vtkBoostPrimMinimumSpanningTree. So I setup a little test case including:
> vtkBoostPrimMinimumSpanningTree* MinimumSpanningTree =
> vtkBoostPrimMinimumSpanningTree::New();
>
> I got a linker error. It was not at all obvious or quick to figure out that
> I needed to link to libvtkInfovis to use this functionality.
>
> Even some of the basic ones that seem ridiculous obvious (i.e. vtkIO for
> vtkXMLPolyDataReader) could be quite annoying to figure out for a first time
> user. Would it make sense to add a single line to every class's
> documentation that explains this? Something like:
>
> Required libraries: vtkIO
>
> Please let me know what you think.
>
> Thanks,
>
> David
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney  2006  NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.acfr.usyd.edu.au/
___________________________________________



More information about the vtkusers mailing list