HashPairedMap


Object Hierarchy:

Object hierarchy for HashPairedMap

Description:

public class HashPairedMap : BaseCollection, PairedMap

A class implementing Collection to store references to child DomElement of Collection.element, using two attributes in items as primary and secondary keys or MappeableElementPairKey.get_map_primary_key and MappeableElementPairKey.get_map_secondary_key methods if MappeableElementPairKey are implemented by items to be added. If one or both keys are not defined in node, it is not added; but keeps it as a child node of actual Collection.element.

If GXml.Element to be added is of type Collection.items_type and implements MappeableElementPairKey, you should set attribute_primary_key and attribute_secondary_key to null in order to use returned value of MappeableElementPairKey.get_map_primary_key and MappeableElementPairKey.get_map_secondary_key as keys.

  public class YourObject : GXml.Element, MappeableElementPairKey {
[Description (nick="::Name")]
public string name { get; set; }
public string code { get; set; }
public string get_map_primary_key () { return code; }
public string get_map_secondary_key () { return name; }
}
public class YourList : HashPairedMap {
construct {
try { initialize_with (typeof (YourObject)); }
catch (GLib.Error e) {
warning ("Initialization error for collection type: %s : %s"
.printf (get_type ().name(), e.message));
}
}
}


Namespace: GXml
Package: GXml-0.20

Content:

Properties:

Creation methods:

Methods:

Fields:

Inherited Members:

All known members inherited from class GLib.Object
All known members inherited from interface Gee.Traversable
All known members inherited from interface Gee.Iterable
All known members inherited from interface GXml.Collection