[fpc-devel] FPDoc improvements

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Wed Nov 30 09:35:25 CET 2011



On Wed, 30 Nov 2011, Hans-Peter Diettrich wrote:

> Michael Van Canneyt schrieb:
>
>>>> That would conflict with the GUI TApplication instance, so I really don't 
>>>> see the point of this exercise.
>>> 
>>> Then another error in the logic exists: CreateDocumentation should be a 
>>> method of TFPDocProject, not of TFPDocAplication.
>> 
>> Why ? TFPDocProject is just storage of data. It has no dependencies on the 
>> rest of fpdoc, and this is by design.
>
> Where else should the CreateDocumentation method reside, so that it is 
> available in other projects?

I do not think it should be available in other projects. I can perfectly
think of a system where all descriptions are in a database, and then the
whole CreateDocumentation method is useless. In fact, such a system existed
for a short time, in a web front-end, which created a single page only.

> again resides in the fpdoc program file, only the fpdoc program can create 
> documentation - what makes the remaining fpdoc units useless in other 
> projects.

No, it just requires them to copy about 50 lines from fpdoc.pp and possibly
adapt these for their particular use-case. There is no problem with that.

I see no point in abstracting out a single routine. First of all since this
routine is useless without knowledge of all the rest of the routines and
setup. Doubly so because later on there'll be inevitably questions to adapt 
it to some particular use-case for which it wasn't designed in the first 
place. I think it is better to copy this routine; The person wanting to do
something with it will need to study the sources anyway to understand the system.

Feel free to disagree, though.

Michael.



More information about the fpc-devel mailing list