|
From: Michalis K. <mic...@gm...> - 2011-06-28 16:33:13
|
Aleš Pavel wrote:
> I used to studio 20011 abd exists some solution for error by
> generating public type?
> without rewrite sources, of course.
>
> example:
>
> { Metric class }
> TMetricClass = class
> public type <-- ERROR
Unfortunately, PasDoc doesn't support such constructs for now. (FPC also
has them, see
http://wiki.lazarus.freepascal.org/class_extensions_examples ). Patches
(changes will be needed at least in PasDoc_Parser, and in PasDoc_Items
hierarchy) are welcome. This isn't so trivial to implement, but should
be doable.
Until then, you may trick PasDoc into omitting the problematic code by
{ Metric class }
TMetricClass = class
public
{$ifndef PASDOC}
type
{ Metric struct }
TMetricStruct = record
MinTime: integer;
MaxTime: integer;
AvgTime: integer;
Attempts: integer;
TotalTime: integer;
LastAttempt: integer;
end;
{$endif}
...
and then define PASDOC symbol when generating the docs. For example, run
"pasdoc --define PASDOC yoursources.pas" if you use pasdoc from
command-line (pasdoc_gui also has appropriate tab to set this). Of
course, this means that docs will be a little incomplete.
Michalis
|