[prev in list] [next in list] [prev in thread] [next in thread]
List: gtkmm
Subject: Wrapping GHashTable, which approach?
From: Robin Lee <robinlee.sysu () gmail ! com>
Date: 2016-11-29 3:04:12
Message-ID: CAG8B0OzVx6C2sj-Rn+cv1Un67z4K_Mn4rYcPUhPh=FvWXeVS1w () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
I am learning to wrap a GObject-based library with gmmproc and encounter a
signal callback that comes with an argument of type GHashTable. But there is
no wrapper for this type, so I am figuring out what to do next.
One straight approach is wrapping GHashTable like Glib::BalancedTree for
GTree.
But I also found that glibmm is following a trend that use std::vector in
API
instead of exposing wrappers of Glib data structures. So for GHashTable, we
may replace the argument with type std::unordered_map, and make a
HashTableHandler for the conversion.
Any ideas?
-robin
[Attachment #5 (text/html)]
<div dir="ltr">
<p>
Hi,
</p>I am learning to wrap a GObject-based library with gmmproc and encounter \
a<br>signal callback that comes with an argument of type GHashTable. But there \
is<br>no wrapper for this type, so I am figuring out what to do next.<br><br>One \
straight approach is wrapping GHashTable like Glib::BalancedTree for \
GTree.<br><br>But I also found that glibmm is following a trend that use std::vector \
in API<br>instead of exposing wrappers of Glib data structures. So for GHashTable, \
we<br>may replace the argument with type std::unordered_map, and make \
a<br>HashTableHandler for the conversion.<br><br><p> Any ideas?
</p>
<p>
-robin
</p>
</div>
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic