[fpc-devel] Circular references and forward declarations

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Jan 5 23:57:17 CET 2010


On 05/01/2010, JoshyFun <joshyfun at gmail.com> wrote:
>
>  interface
>  [...]
>  {$I InterfaceOnly C:\xxxx.pas}
>  [...]
>  Implementation
>  {$I ImplementationOnly C:\xxxx.pas}
>  [...]
>
>  I think it will not include a big penalty in the parser, or maybe I'm
>  completly wrong ?


I have done with with 100's of include files. One base unit and one
include file which contains both the interface and implementation. I
had to use defines to solve the latter trick.

This gave you the impression that you are using multiple units with
circular references, but with one BIG flaw! ALL classes could access
all private fields etc. of other classes. This really broke my rules
of class design and visibility, so I stopped using that method.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-devel mailing list