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

Re: [virt-tools-list] [libosinfo 01/11] Add datamap classes



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 redhat com> 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: pgpLJMm9J3MnO.pgp
Description: PGP signature


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