[fpc-devel] fpdoc / methods/properties in inherited

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Nov 16 00:50:29 CET 2009


On Sun, 15 Nov 2009 19:33:41 +0000
Martin <lazarus at mfriebe.de> wrote:

> Another question
> 
> Asume the following
> 
> type
>   TListBase = class
>   protected
>     Procedure SetFoo(AValue: TFoo) ; virtual; abstract;
>     Function GetFoo: TFoo ; virtual; abstract;
>   public
>     property Foo read GetFoo write SetFoo;
>   end;
> 
>   TListSpecific = class(TListBase)
>   protected
>     Procedure SetFoo(AValue: TFoo) ; override;
>     Function GetFoo: TFoo ; override;
>   end;
> 
> In TListSpecific the property Foo may have additional behaviour (and it 
> may differ from other subclassses. However, I found no way, to document 
> the property in the inherited class, differently from the base class. Of 
> course no one can ever reach this by pressing F1 in the source, because 
> there is no property declaration on whcih click F1.

You can add 

  public
    property Foo; 

and document that.

 
> But it could be referred to, by other classes:
> 
>   TOther = Class
>   public
>      property List: TlistSpecific;
>      property ListFoo: TFoo;
>   end
> 
> Now in the documentation of TOther.ListFoo there may be a reason to 
> link/seealso to TListSpecific.Foo.


Mattias



More information about the fpc-devel mailing list