[Lazarus] Circular references

Vincent Snijders vsnijders at vodafonevast.nl
Fri Aug 14 15:44:12 CEST 2009

Lee Jenkins schreef:
> I had to implement the State Pattern a while back and it was a pain 
> because in order to avoid circular references, all the different state 
> pattern objects had to be in the same unit.  That is of course if you 
> want to refer to the new State object's class when transitioning. 

Transitioning is done in the implementation and the abstract state doesn't have to 
know about its descendant states. Circular references in the implementation are 
allowed, so I don't see the problem.


More information about the Lazarus mailing list