Context
In DelphiAST there is a base class: TmwSimplePasPar
that parses Delphi code.
In addition, there is a class: TPasSyntaxTreeBuilder
that should override each method in the base class.
Question
Is there a way to verify that the descendent class has overridden every virtual method in the base class?
It would be nice to be able to argue.
TPasSyntaxTreeBuilder.Create;
begin
Assert(Self.OverridenMethods.Count = (BaseClass.VirtualMethodCount - TObject.VirtualMethodCount));
....
Please note that I'm talking about all virtual methods, and not just abstract ones (without using abstract methods, it gives a warning).
Johan source
share