![]() |
Interfaces Vererbung Verständnisproblem
Hallo Gemeinde, habe ein kleines Verständnisproblem mit folgender Konstellation:
Delphi-Quellcode:
Besitzt eine Objektinstanz vom Typ TAdvancedObject nun 2x das IBaseInterface (1x ererbt über TBaseObject und 1x über die Implementierung des IAdvancedInterface, welches von IBaseInterface abgeleitet ist) oder nur 1x (so wie ich es gern hätte) ?
IBaseInterface = Interface(IInterface)
[GUID] procedure SetNum(Value:Integer); stdcall; function GetNum : Integer; stdcall; property Num : Integer read GetNum write SetNum; end; IAdvancedInterface = Interface(IBaseInterface) [GUID] procedure SetVal(Value:Integer); stdcall; function GetVal : Integer; stdcall; property Val : Integer read GetVal write SetVal; end; TBaseObject = Class(TInterfacedObject,IBaseInterface) private procedure SetNum(Value:Integer); stdcall; function GetNum : Integer; stdcall; end; TAdvancedObject = Class(TBaseObject,IAdvancedInterface) private procedure SetVal(Value:Integer); stdcall; function GetVal : Integer; stdcall; end; Gruß |
Re: Interfaces Vererbung Verständnisproblem
Zitat:
|
Re: Interfaces Vererbung Verständnisproblem
Ah - Danke!
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:37 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-2025 by Thomas Breitkreuz