views:

90

answers:

1

Sorry for long winded title, this makes a lot more sense with an example.

Suppose we have a class A:

class A {
    public:
        void someFunction();
        void someOtherFunction();
};

And another class that privately inherits from A. However, we re-declare one of the inherited functions as public:

class B : private A {
    public:
        A::someFunction;
}

When this code is processed by Doxygen, it does not recognise the public declaration of someFunction in class B. Instead, it shows someFunction as a privately inherited function. This is incorrect.

Is anybody aware of how to fix this? Cheers

A: 

I can't comment so I'll post this as an answer.

When you do private inheritance in C++, it's a variant of composition or agregation. It's like a "Car - has an - Engine" relationship, so maybe Doxygen has a problem with this syntactic way of doing things. You could probably turn this around a bit to get a good public inheritance or a real composition.

If you want to know more about private and protected inheritance : http://www.parashift.com/c++-faq-lite/private-inheritance.html

Hope it helps !

The code is fine, it is doing exactly what is intended (besides, I didn't write it). I am more interested in whether Doxygen can understand this, perhaps through the use of some combination of tags in the comments.
MichaelM
@hellsoul153: You can change the access mode of members via *acess declarations* (used here) and *using declarations*.
Georg Fritzsche