I have a declaration like this:

I have a declaration like this:

procedure RegisterTemplate(const AID: Integer; const AName: string;
    const AClass: TClass);

My problem is that using such a procedure I can register any class but I want to restrict AClass only to classes which implement a certain interface, ie. IDrawing. How could I achieve that?

Comments