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
Post a Comment