[fpc-devel] Circular references and forward declarations

Matt Emson memson.lists at googlemail.com
Wed Jan 6 08:55:14 CET 2010



On 5 Jan 2010, at 22:40, Graeme Geldenhuys <graemeg.lists at gmail.com>  
wrote:
> I must say, I agree with the original poster - it would be very
> useful. I have had many battles to try and overcome circular reference
> issues, and I do take care in my class designs.

I would also agree. I used to use Interfaces or raise shared classes/ 
declarations to a new unit both could use to overcome this issue  
myself. But I remember the Be GUI porters having loads of issues  
mimicing the Be API header structure because there were so many  
forward class declarations in the C++. It was impossible to do a unit  
to header file match because circular dependencies crept up at almost  
every turn. Without direct matching of header and unit names, the Be  
API documentation became hard to use.  I don't know if they ever  
solved it, maybe if Olivier is still about, he can chime in?

M



More information about the fpc-devel mailing list