Once Delphi.Forms.Visitor (#41) ships, migrate ComputeStatistics in
Delphi.Forms.Statistics to use the visitor for traversal instead of its
ad-hoc recursive walker.
Statistics computation is a natural fit for the visitor: VisitObject
increments component counts and tracks depth, VisitProperty counts
properties and accumulates name frequencies, VisitValue tallies value
kind distribution.
Scope
Acceptance criteria
Once
Delphi.Forms.Visitor(#41) ships, migrateComputeStatisticsinDelphi.Forms.Statisticsto use the visitor for traversal instead of itsad-hoc recursive walker.
Statistics computation is a natural fit for the visitor:
VisitObjectincrements component counts and tracks depth,
VisitPropertycountsproperties and accumulates name frequencies,
VisitValuetallies valuekind distribution.
Scope
TStatisticsVisitorthat accumulates all statisticsfields in
VisitObject,VisitProperty, andVisitValueComputeStatisticswithWalkForm(Form, Visitor)ComputeStatisticspublic API unchangedAcceptance criteria
Delphi.Forms.Statistics