unit WebMap; interface uses Template; type TWebCallback = procedure (const T : TTemplate); procedure Register (const uri : string; callback : TWebCallback); function Get (const uri : string) : TWebCallback; procedure Close; implementation uses contnrs; var uris : TFPHashTable; procedure Register (const uri : string; callback : TWebCallback); begin uris.Add(uri, callback); end; function Get (const uri : string) : TWebCallback; begin Get := TWebCallback(uris[uri]); end; procedure Close; begin uris.Destroy; end; initialization uris := TFPHashTable.Create; end.