Recent

Author Topic: FPDoc support for generics?  (Read 201 times)

dsiders

  • Full Member
  • ***
  • Posts: 238
FPDoc support for generics?
« 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?
« Last Edit: November 23, 2019, 03:30:12 am by dsiders »
Lazarus 2.0.4 / FPC 3.0.4 / Windows 8.1 64-bit

nouzi

  • Full Member
  • ***
  • Posts: 142
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit

PascalDragon

  • Hero Member
  • *****
  • Posts: 716
  • Compiler Developer
Re: FPDoc support for generics?
« Reply #2 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.