Delphi Code Generation

Hi,

Currently TROCodegen4 generates _Intf.pas source code that contains a lot of ifdef’s.
Please, could you add a way to control what switches should be turned ON?

I mean that TROCodegen could have something like this

TROCodegen.DelphiSuppressSwitches: Boolean; 
TROCodegen.DelphiGenerateSwitches: TROCodegenDelphiGenerateSwitches;
TROCodegenDelphiGenerateSwitches = set of (dgsDelphiXE2Up, ...);

To make source code more readable it would be great to control at least the following switches:

  1. DELPHIXE2UP
  2. RO_RTTI_Support
  3. RO_GenericArray
  4. FPC

The new approach with DelphiSuppressSwitches:= False (by default) won’t influence the existing clients, which use the switches.

Best regards
Alexander

1 Like

Hi,

good q…
from one side - _Intf will be more readable,
from other - codegen itself will be more complicated and this feature will be disabled by default …

Hi Evgeny,

and what is your decision we should rely on?

Best regards
Alexander

Thanks, logged as bugs://85889

bugs://85889 got closed with status fixed.