Aus dem Kopf sah es ungefähr so aus:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29:
| Type TTest= Class(TCustomIni); ... End;
TCustomIniList= Class(TObject); Public Count: Byte; List: Array Of TCustomIni Abstract; Function New: Byte; ... End;
TTestList= Class(TCustomIniList); Private List:Array Of TTest Override; End; ... Function TCustomIniList.New: Byte; Begin Result:= Count; Inc(Count); SetLength(List, Count); <span style="font-style: italic">List[Result]:= TCustomIni.Create;</span> End; |
Der Code stellt nur einen kleinen teil da ich ihn nicht hier hab
Das Ziel ist es In der TCustomIniList so viel wie möglich funktionialität einzubauen, damit die Unterklassen so wenig wie möglich Ballast haben.
Daher wollt ich wissen wi man den Typ heraus findet
[Edit: Code-Tag in Delphi-Tag geändert]