[fpc-pascal] Heterogenous list of objects
g.marcou at chimie.u-strasbg.fr
g.marcou at chimie.u-strasbg.fr
Tue Jan 22 11:22:52 CET 2008
Hi,
I'd like to manage a list of heterogenous objects. For instance, I
have a list of objects to buy in store: cheeses (of class TCheese),
soaps (of class TSoap), flowers (of class TFlower), etc...
I thought to gather pointers to different objects of these classes in
a TList. But, when it comes to manipulate or destroy these items, I am
in trouble: I have lost the information about the precise type of the
object the pointer points to.
Does somebody have an idea?
Thanks in advance,
Gilles Marcou
More information about the fpc-pascal
mailing list