Re: Gee New DualKeyMap proposal






2013/11/17 Maciej Piechotka <uzytkownik2 gmail com>
On Wed, 2013-11-13 at 17:27 -0600, Daniel Espinosa wrote:
> I've added a new object called SerializableDualKeyMap to GXml
> implementing GXml.Serializable interface, and other one called
> SerializableTreeMap.
>
>
> Both implement Serializable, allowing you to create XML representation
> of the objects (if they are Serializable too) contained in a
> Gee.TreeMap and a new class to manage objects with two keys.
>
>
> May you want to add the implementation of SerializableDualKeyMap to
> Gee.
>
>
> If so, may be would be a good idea to create an Interface called
> DualKeyMap an abstract AbstractDualKeyMap and a class called
> HashDuaKeyMap, following Gee conventions, of course implementing the
> required interfaces.
>
>
> Code is located at:
>
> https://git.gnome.org/browse/gxml/commit/?h=serialization&id=e25c4831733fa8d28c0f2b540f4536fe77801311
>
>
>
> What do you think?

Sorry for late reply.

A small comment: Gee.HashMultiMap<P,HashMap<S,V>> - Is there a reason
why it is a multimap? It is {P -> {S -> V, S' -> V'}} differ then {P ->
{S -> V}, P -> {S' -> V}}? What's {P -> {S -> V}, P -> {S -> V'}}?


No really. I just planning to use for handle a lot of objects. But HashMap is another implementation.
 
Regarding rest - what's the usecase/advantage over using just Gee.Map<P,
Gee.Map<S, V>>?

This is a high level class over the more basic ones. This class could be re-used for any case you need two hash keys, but you need a friendly Gee like API and just re-use some-one implementation.

Have you consider to create some high level classes over the existing ones?

--
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los cuates: LIBRE)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]