After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 589902 - Map interface enhancement
Map interface enhancement
Status: RESOLVED FIXED
Product: libgee
Classification: Platform
Component: general
git master
Other All
: Normal enhancement
: 0.3
Assigned To: Tomaz Vajngerl
libgee-maint
Depends on:
Blocks:
 
 
Reported: 2009-07-27 16:32 UTC by Tomaz Vajngerl
Modified: 2009-07-31 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0004-Added-empty-set_all-remove_all-contains_all-to-map-i.patch (15.25 KB, patch)
2009-07-27 16:32 UTC, Tomaz Vajngerl
none Details | Review

Description Tomaz Vajngerl 2009-07-27 16:32:04 UTC
New methods for map:
 - set_all - sets all items (and overwrites existing) from input map into current map
 - remove_all - removes all items from the map that exist in input map
 - contains_all - checks if current map has all elements of the input map
 - empty - property which is true if map is empty, false otherwise
Comment 1 Tomaz Vajngerl 2009-07-27 16:32:27 UTC
Created attachment 139295 [details] [review]
0004-Added-empty-set_all-remove_all-contains_all-to-map-i.patch
Comment 2 Didier "Ptitjes" 2009-07-30 09:48:56 UTC
Tomaz,

Same comments as for bug 589894:

ReadOnlyMap should just call the methods of the wrapped map (_list.empty)

Also, I would prefer that you split that in two commits:
- One introducing AbstractMap
- Another enhancing the Map interface and introducing the implementations

If you are OK with that and don't have time to do it, I can do it.
Comment 3 Didier "Ptitjes" 2009-07-31 16:20:26 UTC
commit 539ea0cf401afd44861807f8ad3fc39de31de3a7
Author: Toma<C5><BE> Vajngerl <quikee@gmail.com>
Date:   Sun Jul 26 12:49:27 2009 +0200

    Add Map.is_empty|set_all|remove_all|contains_all and AbstractMap implementations
    
    Fixes bug 589902.