![]() |
Re: Partielle Klassen
Zitat:
|
Re: Partielle Klassen
Joar, die Lösungen:
- abgeleitete Klassen
Delphi-Quellcode:
- Class Helper
// erste Unit
type TBaseClass = class public procedure InUnit1; end; // zweite Unit uses ersteUnit; type TMainClass = class(TBaseClass); public procedure InUnit2; end; - Include-Dateien
Delphi-Quellcode:
oder
// erste Unit
type TMyClass = class public procedure InUnit1; procedure InUnit2; end; procedure TMyClass.InUnit1; begin end; {$include zweiteUnit.inc} // zweite Unit procedure TMyClass.InUnit2; begin end;
Delphi-Quellcode:
// erste Unit
type TMyClass = class public procedure InUnit1; {$define ZweiHeader} {$include zweiteUnit.inc} end; procedure TMyClass.InUnit1; begin end; {$include zweiteUnit.inc} procedure InUnit2; // zweite Unit {$ifdef ZweiHeader} {$undef ZweiHeader} procedure InUnit2; {$else} procedure TMyClass.InUnit2; begin end; {$endif} |
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz