Recent

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

dsiders

  • Hero Member
  • *****
  • Posts: 1052
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 »
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

nouzi

  • Sr. Member
  • ****
  • Posts: 296
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • 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.

 

TinyPortal © 2005-2018