Generic declaration with unspecified ancestor
Original Reporter info from Mantis: Lord Horazont
-
Reporter name: Jonas Schäfer
Original Reporter info from Mantis: Lord Horazont
- Reporter name: Jonas Schäfer
Description:
Hi all,
I just ran into a situation where I could use something like this:
type
TCommonBaseClass = class;
TSomeObjectTree1 = class(TCommonBaseClass);
TSomeObjectTree2 = class(TCommonBaseClass);
generic TGenericChain<TObjectClass> = class (TObjectClass)
// ...
end;
TTree1Chain = specialize TGenericChain<TSomeObjectTree1>;
TTree2Chain = specialize TGenericChain<TSomeObjectTree2>;
What this all is about, I have two object trees which are very similar. These chains contain multiple of these objects, but need to inherit from their baseclass too.
As the functionallity of the chain is exactly the same it would be nice to have the possibility to have these generic inheritance.
Further information will be kindly provided if needed.
Mantis conversion info:
- Mantis ID: 16588
- OS: linux
- OS Build: fedora 12
- Platform: x86_64
- Monitored by: » Basil Peace (Basil Peace), » Hixie (Ian Hickson), » Artem3213212 (Artem3213212), » alexvins (Alexander Shishkin), » @PascalDragon (Sven Barth)