Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#6

Re: Ist Vererbung streng linear?

  Alt 5. Mär 2008, 20:26
Wie mkinzler schon gesagt hat: Sowas funktioniert in Delphi nicht.

Was du allerdings machen kannst ist ein eine Klasse auf Basis mehrerer Interfaces.

Also z.B.

Delphi-Quellcode:
type
  IOne = interface(IUnknown)
    ['..']
    procedure One;
  end;

  ITwo = interface(IUnknown)
    ['..']
    procedure Two;
  end;

  TOneTwo = class(TInterfacedObject, IOne, ITwo)
  public
    procedure One;
    procedure Two;
  end;
Ist natürlich jetzt nicht so das was du wolltest aber naja. Sowas ähnliches halt

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat