generics - Std::multimap equivalent in delphi -


i looking way store tuples of key (guid) , several objects (all of same type) in hashmap.

my approach define new generic type this:

type tmultimap<t, v> = tdictonary<t, tobjectlist<v>>; //fails,

but rejected compiler.

is there readymade multimap implementaion available in delphi 2010? if not, how can create one?

that doesn't compile, does:

type tmultimap<t, v: class> = class(tdictionary<t, v>); 

but if want "real" multimap instead of building ad-hoc one, check out dehl. it's got several useful container libraries, including handful of multimap implementations.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -