Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
March 09, 2013 DDoc: possible to show inherited class members? | ||||
---|---|---|---|---|
| ||||
Is there a way for DDoc to generate documentation for inherited class members in the documentation for a class?
class A {
int x;
}
/// Derived class
class B : A {
/// Another value
int y;
// ?? how to also show A.x in B's documentation?
}
T
--
Don't drink and derive. Alcohol and algebra don't mix.
|
March 09, 2013 Re: DDoc: possible to show inherited class members? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Saturday, 9 March 2013 at 01:18:29 UTC, H. S. Teoh wrote: > Is there a way for DDoc to generate documentation for inherited class > members in the documentation for a class? > > class A { > int x; > } > /// Derived class > class B : A { > /// Another value > int y; > > // ?? how to also show A.x in B's documentation? > } > > > T There's an enhancement opened about it[1] and I began implementing it a few weeks ago, but I haven't worked on it since. It's definitely on my TODO list though. [1]: http://d.puremagic.com/issues/show_bug.cgi?id=7688 |
March 09, 2013 Re: DDoc: possible to show inherited class members? | ||||
---|---|---|---|---|
| ||||
Posted in reply to H. S. Teoh | On Fri, 08 Mar 2013 20:16:07 -0500, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote: > Is there a way for DDoc to generate documentation for inherited class > members in the documentation for a class? > > class A { > int x; > } > /// Derived class > class B : A { > /// Another value > int y; > > // ?? how to also show A.x in B's documentation? > } > > > T > As far as I can tell, vibe.d's doc generation tool is doing this. http://vibed.org/temp/d-programming-language.org/phobos/std/stream/EndianStream.html -Steve |
March 09, 2013 Re: DDoc: possible to show inherited class members? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Steven Schveighoffer | On Saturday, 9 March 2013 at 02:08:15 UTC, Steven Schveighoffer wrote:
> On Fri, 08 Mar 2013 20:16:07 -0500, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
>
>> Is there a way for DDoc to generate documentation for inherited class
>> members in the documentation for a class?
>>
>> class A {
>> int x;
>> }
>> /// Derived class
>> class B : A {
>> /// Another value
>> int y;
>>
>> // ?? how to also show A.x in B's documentation?
>> }
>>
>>
>> T
>>
>
> As far as I can tell, vibe.d's doc generation tool is doing this.
>
> http://vibed.org/temp/d-programming-language.org/phobos/std/stream/EndianStream.html
>
> -Steve
It would be nice if this was default, and possibly if there was an 'inherit' when overriding much like there is 'ditto' (or just default to base type documentation).
|
March 09, 2013 Re: DDoc: possible to show inherited class members? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kapps | Am Sat, 09 Mar 2013 08:06:18 +0100 schrieb "Kapps" <opantm2+spam@gmail.com>: > It would be nice if this was default, and possibly if there was an 'inherit' when overriding much like there is 'ditto' (or just default to base type documentation). No question. -- Marco |
March 10, 2013 Re: DDoc: possible to show inherited class members? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kapps | On 09/03/2013 07:06, Kapps wrote: > On Saturday, 9 March 2013 at 02:08:15 UTC, Steven Schveighoffer wrote: <snip> >> As far as I can tell, vibe.d's doc generation tool is doing this. >> >> http://vibed.org/temp/d-programming-language.org/phobos/std/stream/EndianStream.html >> >> >> -Steve > > It would be nice if this was default, It needs to be implemented in Ddoc first things first. I suppose it would be a matter of giving the choice between listing them as regular methods (possibly with an "inherited" label) and listing them separately in a distinct format as Javadoc does, and then expecting the specifics of the distinct format to be covered in the Ddoc template. > and possibly if there was an > 'inherit' when overriding much like there is 'ditto' (or just default to > base type documentation). For overridden methods, and for inherited methods if they are being listed as regular methods, it should just default to the inherited documentation. Possibly with an option to include an annotation that the documentation is inherited. Stewart. |
Copyright © 1999-2021 by the D Language Foundation