Forum > Documentation (Maintaining -)

FPDoc support for generics?

(1/1)

dsiders:
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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---generic TLazListClassesItemSize<T> = object  protected    const    ItemSize = SizeOf(T);end; 
If it's supported at all, my best guess would be:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---<element name="TLazListClassesItemSize«T»">  <short></short>  <descr></descr>  <seealso></seealso></element>             <element name="TLazListClassesItemSize«T».ItemSize">   <short></short>   <descr></descr>   <seealso></seealso></element>            

Is this something currently supported in FPDoc?

nouzi:
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

PascalDragon:

--- Quote from: 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

--- End quote ---
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...


--- Quote from: dsiders on November 23, 2019, 02:33:27 am ---Is this something currently supported in FPDoc?

--- End quote ---
Thanks to the work on fcl-passrc for pas2js it recently gained support for generics thus fpdoc might receive it in time as well.

Navigation

[0] Message Index

Go to full version