Machen wir auch so. Zum Beispiel:
Delphi-Quellcode:
IViewValueBase = interface(IViewBase)
['{3EF209C2-81FD-44C6-B231-328BA2FAABE5}']
procedure RegisterHostValidation(const p_ValidationMethod: THostPropertyValidationDelegate);
procedure ClearRegisteredHostValidation();
end;
IViewValueBase<T> = interface(IViewValueBase)
function GetValue(): T;
property Value: T read GetValue;
end;
IViewValue<T> = interface(IViewValueBase<T>)
procedure SetValue(const p_Value: T);
property Value: T read GetValue write SetValue;
end;
IViewValueBoolean = interface(IViewValue<Boolean>)
['{13871F02-44C4-40C4-B2D7-4A592D2A86D3}']
end;
IViewValueString = interface(IViewValue<String>)
['{1322615D-4628-4398-806D-E4E34BCF3BCE}']
end;
IViewValueInteger = interface(IViewValue<Integer>)
['{42524A7C-8BAF-41B4-90D0-77D8C457EDC9}']
end;
IViewValueDouble = interface(IViewValue<Double>)
['{016EE305-1856-4CD5-ACC2-9021F52DED63}']
end;
...
Die implementierenden Klassen sind dann analog dazu.