digitalmars.D.learn - Ddoc inheritance
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (24/24) Jun 11 2012 Hi,
- Andrej Mitrovic (2/7) Jun 11 2012 Maybe we should have "// super ditto" :)
- Jonathan M Davis (5/31) Jun 11 2012 I don't think that anything like that exists, but I expect that it would...
- Ary Manzana (6/26) Jun 11 2012 I believe no special comment is needed for this. If you override a
- Jacob Carlborg (6/11) Jun 11 2012 Sounds like a good idea. I wonder though, if a special comment is needed...
- =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= (8/17) Jun 11 2012 That sounds like a reasonable thing to have.
Hi, Suppose I have: abstract class A { /// My very long and helpful documentation. void foo(); } class B : A { override void foo() { } } Is there any way I can instruct Ddoc to copy the documentation from A.foo to B.foo? Copying it over manually is a maintenance nightmare. Would be neat if you could do something like ditto: /// inherit override void foo() { } -- Alex Rønne Petersen alex lycus.org http://lycus.org
Jun 11 2012
On 6/12/12, Alex R=F8nne Petersen <alex lycus.org> wrote:Would be neat if you could do something like ditto: /// inherit override void foo() { }Maybe we should have "// super ditto" :)
Jun 11 2012
On Tuesday, June 12, 2012 02:59:05 Alex Rønne Petersen wrote:Hi, Suppose I have: abstract class A { /// My very long and helpful documentation. void foo(); } class B : A { override void foo() { } } Is there any way I can instruct Ddoc to copy the documentation from A.foo to B.foo? Copying it over manually is a maintenance nightmare. Would be neat if you could do something like ditto: /// inherit override void foo() { }I don't think that anything like that exists, but I expect that it wouldn't be all that hard to add. The trick, of course, is knowing/learning those sections of the compiler well enough to make the changes. - Jonathan M Davis
Jun 11 2012
On 6/12/12 8:59 , Alex Rønne Petersen wrote:Hi, Suppose I have: abstract class A { /// My very long and helpful documentation. void foo(); } class B : A { override void foo() { } } Is there any way I can instruct Ddoc to copy the documentation from A.foo to B.foo? Copying it over manually is a maintenance nightmare. Would be neat if you could do something like ditto: /// inherit override void foo() { }I believe no special comment is needed for this. If you override a method without commenting it it should retain the original comment. If you do comment it, it should take that new comment. A patch for this should be really easy to do. Maybe I'll do it after (and if) my previous patch gets accepted.
Jun 11 2012
On 2012-06-12 04:20, Ary Manzana wrote:I believe no special comment is needed for this. If you override a method without commenting it it should retain the original comment. If you do comment it, it should take that new comment.Sounds like a good idea. I wonder though, if a special comment is needed if you don't want the overridden method to appear in the docs, for whatever reason.A patch for this should be really easy to do. Maybe I'll do it after (and if) my previous patch gets accepted.-- /Jacob Carlborg
Jun 11 2012
On 12-06-2012 08:29, Jacob Carlborg wrote:On 2012-06-12 04:20, Ary Manzana wrote:That sounds like a reasonable thing to have. Hmm, there's also the issue of a method that implements two equally-named methods in two separate interfaces...I believe no special comment is needed for this. If you override a method without commenting it it should retain the original comment. If you do comment it, it should take that new comment.Sounds like a good idea. I wonder though, if a special comment is needed if you don't want the overridden method to appear in the docs, for whatever reason.-- Alex Rønne Petersen alex lycus.org http://lycus.orgA patch for this should be really easy to do. Maybe I'll do it after (and if) my previous patch gets accepted.
Jun 11 2012