• Join/Login
  • Business Software
  • Open Source Software
  • For Vendors
  • Blog
  • About
  • More
    • Articles
    • Create
    • SourceForge Podcast
    • Site Documentation
    • Subscribe to our Newsletter
    • Support Request
SourceForge logo
For Vendors Help Create Join Login
SourceForge logo
SourceForge logo
Business Software
Open Source Software
SourceForge Podcast
Resources
  • Articles
  • Case Studies
  • Blog
Menu
  • Help
  • Create
  • Join
  • Login
  • Home
  • Browse
  • pasdoc
  • Old Patches

Inherited comments, @implements tag

Documentation generator for Object Pascal code

Brought to you by: ccodere, johill, kambi
This project can now be found here.
  • Summary
  • Files
  • Reviews
  • Support
  • Website
  • GitHub
  • Old News
  • Old Mailing Lists
  • Old Bugs
  • Old Feature Requests
  • Old Patches
  • Old Code
Menu ▾ ▴
  • Create Ticket
  • View Stats

Group

Searches

  • Changes
  • Closed Tickets
  • Open Tickets

Help

  • Formatting Help

#4 Inherited comments, @implements tag

open
nobody
None
5
2014-06-30
2008-07-10
Michalis Kamburelis
No

This is a patch from Ilya Illarionov, that (for various reasons...) was lying unapplied on Michalis disk. I'm submitting it here, so it will get applied (or at least decided about) eventually --- probably after merging some DoDi work, to stabilize a little.

Below I'm pasting the relevant comments about the patch from Ilya Illarionov.


  1. FEATURE: INHERITED COMMENTS (Common core. Output implemented in HtmlDoc
    only.) Some Pascal items (classes, virtual overridden class methods, class
    properties, overloaded routines and class methods) can inherit absent
    comment parts (parameters, abstracts, descriptions etc.) from their
    ancestors automatically. Using inherited comments author doesn't have to
    specify comments for each inherited item in class, just declarations. Such
    approach facilitates a writing of inherited elements, at the same time
    provides full documentation generated by PasDoc for inherited items.

For example:
{ @abstract Basic class
Basic description }
TBasic = class
{ @abstract Method to perform something
Method description
@param Param Some param }
procedure BasicMethod(Param : Type); virtual; end;

{ @abstract Inherited class }
TInherited = class(TBasic)
procedure BasicMethod(Param : Type); override; end;

In spite of absent comments for TInherited class, PasDoc will fully document
TInherited.BasicMethod, using comments from ancestor. For TInherited class
itself PasDoc will use abstract "Inherited class" but description (since its
own description is empty) "Basic Description".

  1. FEATURE: @IMPLEMENTS keyword. Comments inheritance mechanism for
    INHERITED COMMENTS. Using specified ancestor instead of automatic ancestor
    search. Very useful for documenting class member that implements behaviours
    for interfaces (eventually implemented by class) or other objects that are
    related to such a member.

For example:
MyInterface = interface(IInterface)
{ @abstract Does something
Some description
@param Param Necessary parameter }
procedure InterfaceMethod(Param : OleVariant); end;

{ @abstract MyInterface implementation } MyClass = class(TInterfacedObject,
IInterface)
{ @implements MyInterface.InterfaceMethod }
procedure InterfaceMethod(Param : OleVariant); end;

Author does not need to copy comments from interface method to its
implementation, he just have to mark class method as an implementation of
interface method.

Next example:

TNestedClass = class;

TBoundaryClass = class
private
FNested : TNestedClass;
public
{ @abstract Some Action
@param Param Some param }
procedure PerformBoundaryAction (Param : Variant); end; .....
procedure TBoundaryClass.PerformBoundaryAction (Param : Variant); begin
if Assigned(FNested) then FNested.PerformMyAction(Param); end;

TNestedClass=class
public
{ @implements TBoundaryClass.PerformBoundaryAction }
procedure PerformMyAction(Param : Variant); virtual; abstract; end;

Author does not need to copy comments from owning class method to nested
class method (and vice versa), but he points the fact that nested class
method have to be called from boundary class as dynamic behaviour
implementation.

  1. Some win-1251, KOI8-R, cp866 translation was done.

  2. FEATURE: "All members", "All fields", "All methods", "All properties"
    (including inherited) links added to CIO documentation page (for HTML output
    only).

  3. ADDON: DPRUNITLIST unitily is implemented (source code available with
    free third party regexp library). This console utility outputs to STDOUT
    (using absolute or relative path) units being directly included into Delphi
    Project.

  4. FEATURE: @param, @returns, @raises keywords are added to class
    properties. Reading property via PropGet method can raises an exception,
    doesn't it? And array properties can have one or more parameters.


Please, remove any ILLARIONOV signatures from source files before you will
publish them. You may refer to me (if you want) in some unit headers. My
name is Ilya Illarionov, and actual e-mail is <billythekidd AT="" mail="" DOT="" ru="">.

Discussion

  • Michalis Kamburelis

    Michalis Kamburelis - 2008-07-10
     
    illarionov.patch
    If you would like to refer to this comment somewhere else in this project, copy and paste the following link:

Log in to post a comment.

SourceForge
  • Create a Project
  • Open Source Software
  • Business Software
  • Top Downloaded Projects
Company
  • About
  • Team
  • SourceForge Headquarters
    225 Broadway Suite 1600
    San Diego, CA 92101
    +1 (858) 422-6466
Resources
  • Support
  • Site Documentation
  • Site Status
  • SourceForge Reviews
SourceForge logo
© 2025 Slashdot Media. All Rights Reserved.
Terms Privacy Opt Out Advertise
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.