Hello,
I'm trying to add new features in a third generic type. Please see this
simulation below:
{ TThirdGeneric }
generic TThirdGeneric<T> = class
private
FFoo: T;
public
procedure Post;
property Foo: T read FFoo;
end;
{ TMyGeneric }
generic TMyGeneric<T> = class(TThirdGeneric)
public
procedure ConfigureFoo;
end;
{ TMyClass }
TMyClass = class(TMyGeneric)
public
procedure Post;
end;
...
{ TMyGeneric }
procedure TMyGeneric.ConfigureFoo;
begin
... pre configure Foo ...
end;
{ TMyClass }
procedure TMyClass.Post;
begin
Write(Foo.AProperty); // using pre configured Foo
end;
Just trying to understand the generics concept correctly. :S
--
Silvio Clécio
My public projects - github.com/silvioprog
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal