KDE_NO_EXPORT

Allen Winter winter at kde.org
Tue Jul 18 22:51:06 BST 2006


On Tuesday 18 July 2006 16:11, Thiago Macieira wrote:
> Allen Winter wrote:
> >It seems to me that public library classes should either be KDE_EXPORTed
> > or KDE_NO_EXPORTed. True?
> 
> Not exactly. They should be XXXXX_EXPORT'ed when they are public. There's 
> no need to no-export private ones.
> 
> KDE_EXPORT should never be used directly.
> 
> >So, what I'm really asking is... for public classes that are not marked
> > with the FOO_EXPORT macro, would it be ok to mark them with the
> > KDE_NO_EXPORT macro?  (assuming that they really are not for exporting
> > and we simply didn't forget to FOO_EXPORT them).
> 
> That's unnecessary cruft in our headers. No compiler requires that flag.
> 
Perhaps first time I'm disagreeing with Thiago...

The KDE_NO_EXPORT is no more cruft than a comment saying "Please do no make
this class visible because it is private and I want to keep it that way..." or using the
@internal doxygen tag. 

We need some method to tag a public class as "invisible".
Then we don't have bug the developers asking... are the following
classes supposed to be invisible outside the library or did you just
forget to put on the XXXX_EXPORT macro?

We can do that with a comment, a doxygen tag, or the KDE_NO_EXPORT macro.
Which would we prefer?

-Allen


-- 
Let's Keep the Political Talk Out of KDE PLEASE




More information about the kde-core-devel mailing list