Re: [libosinfo 01/11] Add datamap classes

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

 



On Mon, Dec 10, 2012 at 11:46:47PM +0200, Zeeshan Ali (Khattak) wrote:
> On Mon, Dec 10, 2012 at 6:45 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> > +void osinfo_datamap_insert(OsinfoDatamap *map,
> > +                           const gchar *inval,
> > +                           const gchar *outval);
> > +
> > +const gchar *osinfo_datamap_lookup(OsinfoDatamap *map,
> > +                                   const gchar *inval);
> 
> 
> The parent Entity class already provides API that does the same thing
> as the two methods above + some utility API on top.

If you look at how this is implemented, not really, OsinfoDatamap has its
own GHashTable. Imo OsinfoEntity stores attributes with well-known names
and meaning in the XML file, while in this case we will be storing a list
of 'anonymous' key/value pairs. Storing these as entity parameters would
prevent us from remapping 'id', which could be an issue. So I think
have to go with the separate hash table/API.

Christophe

Attachment: pgpRFVUcfM1fe.pgp
Description: PGP signature

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list

[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux