|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > Darren New <dne### [at] san rr com> wrote:
> >> Then you generate the header docs from the source code and you're good to
> >> go.
> >
> > Not everything in a source file is supposed to be part of the public
> > interface.
> Ah, but it *is*, in C++.[1]
What do you mean? Ever heard of the nameless namespace? Everything in
a nameless namespace is local to that source file and definitely not part
of the public interface of that module. (In fact, there's no way of
accessing anything inside a nameless namespace from another source file.)
Also an inner class doesn't have to be declared in the public interface
(only its name has to be pre-declared, but that's not very helpful from
the outside).
(In fact, even an inner class in the *public* interface of a class
doesn't have to be declared. It will work as a completely opaque type
from the outside in that case. I think this is an even more important
case where you *don't* want that inner class to become public, except
as an incomplete type, ie. "in type name only".)
> In C#, you can tell it to leave the private
> functions out of the generated documentation altogether. :)
Btw, I really don't see a lot of difference between fancy source editor
features and a public interface generator. In both cases you need some fancy
external program to help you clarify the source code.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |