1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
TMyPrinter=class;
// un groupe d'information est un ensemble d'informations
TGroupInformation = class(TPersistent)
public
// on peut associer une ou plusieurs imprimantes à un groupe d'information
procedure Add(Printer: TMyPrinter);
end;
//gestionnaire de groupe d'information
TItemsManager<T: TGroupInformation,constructor> = class
public
procedure Assign(Item: T; Printer: TMyPrinter);
end;
procedure TItemsManager<T>.Assign(Item: T; Printer: TMyPrinter);
begin
Item.Add(Printer);
end;
// un Tlot est l'ensemble des informations associées à un lot de livraison (fournisseur, ref, ect....)
TLot = class(TGroupInformation)
public
......
end;
TLotManager = class(TItemsManager<TLot>); |
Partager