[vtk-developers] GeoJSONReader HeaderTest failed due to Multiple Includes

Jatin Parekh jatinparekh93 at gmail.com
Thu Jun 26 14:15:18 EDT 2014


Hi!
Thanks David! That really helped!
I added small comments along with the headers, and it worked.

@Marcus: I accidentally provided the link to an old repository. The updated
ones have forward declarations as required, and the rest have been moved to
the cxx file. Aashish sir had pointed out those changes earlier itself.

Thanks marcus and david!
Jatin.


On Thu, Jun 26, 2014 at 10:47 PM, Marcus D. Hanwell <
marcus.hanwell at kitware.com> wrote:

> On Thu, Jun 26, 2014 at 11:49 AM, David E DeMarle
> <dave.demarle at kitware.com> wrote:
> >
> > On Thu, Jun 26, 2014 at 10:47 AM, Jatin Parekh <jatinparekh93 at gmail.com>
> > wrote:
> >>
> >> VTKIOGEOJSON_EXPORT
> >
> >
> > Means that you need to put this macro (defined by vtk's cmake scripts) in
> > your class definitions. It makes declspecs for windows shared lib
> builds. As
> > Aashish says, see other vtk headers for examples. You will see how they
> all
> > include a configured header that defines it.
> >
> >> has 2 includes
> >
> >
> > The multiple headers is a vtk style guideline. To keep compilation quick
> and
> > declarations contained the guidelines recommend a single include per
> header
> > file. In practice we need two since modularization for the modern export
> > macros but that is beside the point. If you need more than three
> includes in
> > your header then you should rethink the design. If you have two or three
> > then you can get through this style check by adding a short comment after
> > each include which describes why you need to include more than one
> header.
> >
> Looking at some of your headers it is clear you have a lot of includes
> that should just be in the implementation, and you should forward
> declare classes that you just need as pointers/references in the API.
>
> https://github.com/jatin3893/vtkDataSetReaders/blob/master/vtkGeoJSONReader.h
> contains many things that I don't see referenced in the header. I hope
> you can keep the JSON include to the implementation.
>
> Marcus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140626/9511f5ba/attachment-0002.html>


More information about the vtk-developers mailing list