Re: Header multiple inclusion error

Jean-Paul Saman <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvbpsi.devel
Message-ID <CAK9US3A1eumi963JtS5c9Vt8+-YgC-nDxNzE7uBdVB-wVGWSbQ@mail.gmail.com>
On Tue, May 14, 2013 at 1:46 PM, Andrey Utkin <
[email protected]> wrote:

> 2013/5/14 Jean-Paul Saman <[email protected]>:
> > In case of multiple inclusion of a header file is usually a sign that the
> > design is flawed.
> > Your design probably exposes more internal details than it needs too.
> >
> > It could easily lead to circular dependencies. It is cleaner to have
> header
> > files as much
> > as possible declared inside the *.c file.
> >
> > This is my 2cts on the subject.
> >
> >> And with workaround you gave, i see the problem of having type
> >> dvbpsi_t undefined in headers. As i explained, i need this type as
> >> classes datamembers.
>
> It feels like you ignore what i say.
>

I think we can safely agree on the fact that we disagree. It is your
project,
so structure it like you want, but I won't include a patch-set that removes
the #error from libdvbpsi header files.


> Your point is very valid for C, but I have C++ project, not C. It is
> usual to declare fully the object structure in .h file, and private
> data members, too, you know. Well, as far as i know, there's no way at
> all to _not_ declare private datamembers in .h and declare them later
> in .cpp of that same class.
> And the classes i address to are not of public API, they're just
> classes inside my project, i don't want to use PIMPL pattern or
> something else, splitting classes into two _only_ to workaround the
> compilation fail forced by library.
>
> I'd say it again - i am not against include guard as such, i am for
> removal of compilation fail forcing. It is not used anywhere else!
> Look at include guarding in other projects, they don't have it. Look
> at wiki, there's no even mention of such behaviour, everywhere it is
> just
> #ifndef HEADER_H_
> #define HEADER_H_
> // declarations
> #endif
>
> --
> Andrey Utkin
>

Kind regards,

Jean-Paul Saman.

_______________________________________________
libdvbpsi-devel mailing list
[email protected]
http://mailman.videolan.org/listinfo/libdvbpsi-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.