Lazarus

Miscellaneous => Documentation (Maintaining -) => Topic started by: dsiders on November 23, 2019, 02:33:27 am

Title: FPDoc support for generics?
Post by: dsiders on November 23, 2019, 02:33:27 am
I've been looking for information about the current level of support in FPDoc for generics. There is no documentation for it use in fpdoc.chm. I saw a post from 2016 that hinted support had some how been improved, but no details or specifics.

I am looking for the FPDoc tagging conventions used for things like the following:

Code: Pascal  [Select]
  1. generic TLazListClassesItemSize<T> = object
  2.   protected
  3.     const
  4.     ItemSize = SizeOf(T);
  5. end;
  6.  

If it's supported at all, my best guess would be:

Code: Pascal  [Select]
  1. <element name="TLazListClassesItemSize«T»">
  2.   <short></short>
  3.   <descr></descr>
  4.   <seealso></seealso>
  5. </element>      
  6.      
  7.  <element name="TLazListClassesItemSize«T».ItemSize">
  8.    <short></short>
  9.    <descr></descr>
  10.    <seealso></seealso>
  11. </element>      
  12.  
     

Is this something currently supported in FPDoc?
Title: Re: FPDoc support for generics?
Post by: nouzi on November 23, 2019, 08:10:43 am
Hi for all lazarus/fpc developer
@raiders
See this
https://wiki.freepascal.org/Generics_proposals#How_to_derive_from_the_generic_type


https://wiki.freepascal.org/FPC_New_Features_3.2#Support_for_generic_routines
Title: Re: FPDoc support for generics?
Post by: PascalDragon on November 23, 2019, 12:14:16 pm
Hi for all lazarus/fpc developer
@raiders
See this
https://wiki.freepascal.org/Generics_proposals#How_to_derive_from_the_generic_type


https://wiki.freepascal.org/FPC_New_Features_3.2#Support_for_generic_routines
dsiders question is about fpdoc support, not support in FPC itself. Also the first link is way out of date. We should probably stuff it into some attic or so...

Is this something currently supported in FPDoc?
Thanks to the work on fcl-passrc for pas2js it recently gained support for generics thus fpdoc might receive it in time as well.