1 /* bidirsortedmap.c generated by valac 0.18.0, the Vala compiler
2 * generated from bidirsortedmap.vala, do not modify */
6 * Copyright (C) 2012 Maciej Piechotka
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 * Maciej Piechotka <uzytkownik2@gmail.com>
27 #include <glib-object.h>
30 #define GEE_TYPE_TRAVERSABLE (gee_traversable_get_type ())
31 #define GEE_TRAVERSABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TRAVERSABLE, GeeTraversable))
32 #define GEE_IS_TRAVERSABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TRAVERSABLE))
33 #define GEE_TRAVERSABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_TRAVERSABLE, GeeTraversableIface))
35 typedef struct _GeeTraversable GeeTraversable;
36 typedef struct _GeeTraversableIface GeeTraversableIface;
38 #define GEE_TRAVERSABLE_TYPE_STREAM (gee_traversable_stream_get_type ())
40 #define GEE_TYPE_LAZY (gee_lazy_get_type ())
41 #define GEE_LAZY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_LAZY, GeeLazy))
42 #define GEE_LAZY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_LAZY, GeeLazyClass))
43 #define GEE_IS_LAZY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_LAZY))
44 #define GEE_IS_LAZY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_LAZY))
45 #define GEE_LAZY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_LAZY, GeeLazyClass))
47 typedef struct _GeeLazy GeeLazy;
48 typedef struct _GeeLazyClass GeeLazyClass;
50 #define GEE_TYPE_ITERATOR (gee_iterator_get_type ())
51 #define GEE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERATOR, GeeIterator))
52 #define GEE_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ITERATOR))
53 #define GEE_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_ITERATOR, GeeIteratorIface))
55 typedef struct _GeeIterator GeeIterator;
56 typedef struct _GeeIteratorIface GeeIteratorIface;
58 #define GEE_TYPE_ITERABLE (gee_iterable_get_type ())
59 #define GEE_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERABLE, GeeIterable))
60 #define GEE_IS_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ITERABLE))
61 #define GEE_ITERABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_ITERABLE, GeeIterableIface))
63 typedef struct _GeeIterable GeeIterable;
64 typedef struct _GeeIterableIface GeeIterableIface;
66 #define GEE_TYPE_MAP (gee_map_get_type ())
67 #define GEE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_MAP, GeeMap))
68 #define GEE_IS_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_MAP))
69 #define GEE_MAP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_MAP, GeeMapIface))
71 typedef struct _GeeMap GeeMap;
72 typedef struct _GeeMapIface GeeMapIface;
74 #define GEE_TYPE_MAP_ITERATOR (gee_map_iterator_get_type ())
75 #define GEE_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_MAP_ITERATOR, GeeMapIterator))
76 #define GEE_IS_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_MAP_ITERATOR))
77 #define GEE_MAP_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_MAP_ITERATOR, GeeMapIteratorIface))
79 typedef struct _GeeMapIterator GeeMapIterator;
80 typedef struct _GeeMapIteratorIface GeeMapIteratorIface;
82 #define GEE_TYPE_COLLECTION (gee_collection_get_type ())
83 #define GEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_COLLECTION, GeeCollection))
84 #define GEE_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_COLLECTION))
85 #define GEE_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_COLLECTION, GeeCollectionIface))
87 typedef struct _GeeCollection GeeCollection;
88 typedef struct _GeeCollectionIface GeeCollectionIface;
90 #define GEE_TYPE_SET (gee_set_get_type ())
91 #define GEE_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SET, GeeSet))
92 #define GEE_IS_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SET))
93 #define GEE_SET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_SET, GeeSetIface))
95 typedef struct _GeeSet GeeSet;
96 typedef struct _GeeSetIface GeeSetIface;
98 #define GEE_MAP_TYPE_ENTRY (gee_map_entry_get_type ())
99 #define GEE_MAP_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_MAP_TYPE_ENTRY, GeeMapEntry))
100 #define GEE_MAP_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_MAP_TYPE_ENTRY, GeeMapEntryClass))
101 #define GEE_MAP_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_MAP_TYPE_ENTRY))
102 #define GEE_MAP_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_MAP_TYPE_ENTRY))
103 #define GEE_MAP_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_MAP_TYPE_ENTRY, GeeMapEntryClass))
105 typedef struct _GeeMapEntry GeeMapEntry;
106 typedef struct _GeeMapEntryClass GeeMapEntryClass;
108 #define GEE_TYPE_SORTED_MAP (gee_sorted_map_get_type ())
109 #define GEE_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_MAP, GeeSortedMap))
110 #define GEE_IS_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_MAP))
111 #define GEE_SORTED_MAP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_SORTED_MAP, GeeSortedMapIface))
113 typedef struct _GeeSortedMap GeeSortedMap;
114 typedef struct _GeeSortedMapIface GeeSortedMapIface;
116 #define GEE_TYPE_SORTED_SET (gee_sorted_set_get_type ())
117 #define GEE_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_SET, GeeSortedSet))
118 #define GEE_IS_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_SET))
119 #define GEE_SORTED_SET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_SORTED_SET, GeeSortedSetIface))
121 typedef struct _GeeSortedSet GeeSortedSet;
122 typedef struct _GeeSortedSetIface GeeSortedSetIface;
124 #define GEE_TYPE_BIDIR_SORTED_MAP (gee_bidir_sorted_map_get_type ())
125 #define GEE_BIDIR_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_BIDIR_SORTED_MAP, GeeBidirSortedMap))
126 #define GEE_IS_BIDIR_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_BIDIR_SORTED_MAP))
127 #define GEE_BIDIR_SORTED_MAP_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_BIDIR_SORTED_MAP, GeeBidirSortedMapIface))
129 typedef struct _GeeBidirSortedMap GeeBidirSortedMap;
130 typedef struct _GeeBidirSortedMapIface GeeBidirSortedMapIface;
132 #define GEE_TYPE_BIDIR_MAP_ITERATOR (gee_bidir_map_iterator_get_type ())
133 #define GEE_BIDIR_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_BIDIR_MAP_ITERATOR, GeeBidirMapIterator))
134 #define GEE_IS_BIDIR_MAP_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_BIDIR_MAP_ITERATOR))
135 #define GEE_BIDIR_MAP_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_BIDIR_MAP_ITERATOR, GeeBidirMapIteratorIface))
137 typedef struct _GeeBidirMapIterator GeeBidirMapIterator;
138 typedef struct _GeeBidirMapIteratorIface GeeBidirMapIteratorIface;
140 #define GEE_TYPE_ABSTRACT_MAP (gee_abstract_map_get_type ())
141 #define GEE_ABSTRACT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap))
142 #define GEE_ABSTRACT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_MAP, GeeAbstractMapClass))
143 #define GEE_IS_ABSTRACT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_MAP))
144 #define GEE_IS_ABSTRACT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_MAP))
145 #define GEE_ABSTRACT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_MAP, GeeAbstractMapClass))
147 typedef struct _GeeAbstractMap GeeAbstractMap;
148 typedef struct _GeeAbstractMapClass GeeAbstractMapClass;
150 #define GEE_TYPE_ABSTRACT_SORTED_MAP (gee_abstract_sorted_map_get_type ())
151 #define GEE_ABSTRACT_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_SORTED_MAP, GeeAbstractSortedMap))
152 #define GEE_ABSTRACT_SORTED_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_SORTED_MAP, GeeAbstractSortedMapClass))
153 #define GEE_IS_ABSTRACT_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_SORTED_MAP))
154 #define GEE_IS_ABSTRACT_SORTED_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_SORTED_MAP))
155 #define GEE_ABSTRACT_SORTED_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_SORTED_MAP, GeeAbstractSortedMapClass))
157 typedef struct _GeeAbstractSortedMap GeeAbstractSortedMap;
158 typedef struct _GeeAbstractSortedMapClass GeeAbstractSortedMapClass;
160 #define GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP (gee_abstract_bidir_sorted_map_get_type ())
161 #define GEE_ABSTRACT_BIDIR_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP, GeeAbstractBidirSortedMap))
162 #define GEE_ABSTRACT_BIDIR_SORTED_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP, GeeAbstractBidirSortedMapClass))
163 #define GEE_IS_ABSTRACT_BIDIR_SORTED_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP))
164 #define GEE_IS_ABSTRACT_BIDIR_SORTED_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP))
165 #define GEE_ABSTRACT_BIDIR_SORTED_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_BIDIR_SORTED_MAP, GeeAbstractBidirSortedMapClass))
167 typedef struct _GeeAbstractBidirSortedMap GeeAbstractBidirSortedMap;
168 typedef struct _GeeAbstractBidirSortedMapClass GeeAbstractBidirSortedMapClass;
170 #define GEE_TYPE_TREE_MAP (gee_tree_map_get_type ())
171 #define GEE_TREE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TREE_MAP, GeeTreeMap))
172 #define GEE_TREE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TREE_MAP, GeeTreeMapClass))
173 #define GEE_IS_TREE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TREE_MAP))
174 #define GEE_IS_TREE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TREE_MAP))
175 #define GEE_TREE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TREE_MAP, GeeTreeMapClass))
177 typedef struct _GeeTreeMap GeeTreeMap;
178 typedef struct _GeeTreeMapClass GeeTreeMapClass;
179 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
181 typedef gboolean (*GeeForallFunc) (gpointer g, void* user_data);
183 GEE_TRAVERSABLE_STREAM_YIELD,
184 GEE_TRAVERSABLE_STREAM_CONTINUE,
185 GEE_TRAVERSABLE_STREAM_END
186 } GeeTraversableStream;
188 typedef GeeTraversableStream (*GeeStreamFunc) (GeeTraversableStream state, GeeLazy* g, GeeLazy** lazy, void* user_data);
189 struct _GeeIteratorIface {
190 GTypeInterface parent_iface;
191 gboolean (*next) (GeeIterator* self);
192 gboolean (*has_next) (GeeIterator* self);
193 gpointer (*get) (GeeIterator* self);
194 void (*remove) (GeeIterator* self);
195 gboolean (*get_valid) (GeeIterator* self);
196 gboolean (*get_read_only) (GeeIterator* self);
199 typedef gpointer (*GeeFoldFunc) (gpointer g, gpointer a, void* user_data);
200 typedef gpointer (*GeeMapFunc) (gpointer g, void* user_data);
201 typedef gboolean (*GeePredicate) (gconstpointer g, void* user_data);
202 struct _GeeTraversableIface {
203 GTypeInterface parent_iface;
204 GType (*get_g_type) (GeeTraversable* self);
205 GBoxedCopyFunc (*get_g_dup_func) (GeeTraversable* self);
206 GDestroyNotify (*get_g_destroy_func) (GeeTraversable* self);
207 gboolean (*foreach) (GeeTraversable* self, GeeForallFunc f, void* f_target);
208 GeeIterator* (*stream) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeStreamFunc f, void* f_target, GDestroyNotify f_target_destroy_notify);
209 gpointer (*fold) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
210 GeeIterator* (*map) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeMapFunc f, void* f_target);
211 GeeIterator* (*scan) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
212 GeeIterator* (*filter) (GeeTraversable* self, GeePredicate pred, void* pred_target, GDestroyNotify pred_target_destroy_notify);
213 GeeIterator* (*chop) (GeeTraversable* self, gint offset, gint length);
214 GType (*get_element_type) (GeeTraversable* self);
217 struct _GeeIterableIface {
218 GTypeInterface parent_iface;
219 GType (*get_g_type) (GeeIterable* self);
220 GBoxedCopyFunc (*get_g_dup_func) (GeeIterable* self);
221 GDestroyNotify (*get_g_destroy_func) (GeeIterable* self);
222 GeeIterator* (*iterator) (GeeIterable* self);
225 typedef gpointer (*GeeFoldMapFunc) (gconstpointer k, gconstpointer v, gpointer a, void* user_data);
226 typedef gboolean (*GeeForallMapFunc) (gconstpointer k, gconstpointer v, void* user_data);
227 struct _GeeMapIteratorIface {
228 GTypeInterface parent_iface;
229 GType (*get_k_type) (GeeMapIterator* self);
230 GBoxedCopyFunc (*get_k_dup_func) (GeeMapIterator* self);
231 GDestroyNotify (*get_k_destroy_func) (GeeMapIterator* self);
232 GType (*get_v_type) (GeeMapIterator* self);
233 GBoxedCopyFunc (*get_v_dup_func) (GeeMapIterator* self);
234 GDestroyNotify (*get_v_destroy_func) (GeeMapIterator* self);
235 gboolean (*next) (GeeMapIterator* self);
236 gboolean (*has_next) (GeeMapIterator* self);
237 gpointer (*get_key) (GeeMapIterator* self);
238 gpointer (*get_value) (GeeMapIterator* self);
239 void (*set_value) (GeeMapIterator* self, gconstpointer value);
240 void (*unset) (GeeMapIterator* self);
241 gpointer (*fold) (GeeMapIterator* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldMapFunc f, void* f_target, gpointer seed);
242 gboolean (*foreach) (GeeMapIterator* self, GeeForallMapFunc f, void* f_target);
243 gboolean (*get_valid) (GeeMapIterator* self);
244 gboolean (*get_mutable) (GeeMapIterator* self);
245 gboolean (*get_read_only) (GeeMapIterator* self);
248 struct _GeeCollectionIface {
249 GTypeInterface parent_iface;
250 GType (*get_g_type) (GeeCollection* self);
251 GBoxedCopyFunc (*get_g_dup_func) (GeeCollection* self);
252 GDestroyNotify (*get_g_destroy_func) (GeeCollection* self);
253 gboolean (*contains) (GeeCollection* self, gconstpointer item);
254 gboolean (*add) (GeeCollection* self, gconstpointer item);
255 gboolean (*remove) (GeeCollection* self, gconstpointer item);
256 void (*clear) (GeeCollection* self);
257 gboolean (*add_all) (GeeCollection* self, GeeCollection* collection);
258 gboolean (*contains_all) (GeeCollection* self, GeeCollection* collection);
259 gboolean (*remove_all) (GeeCollection* self, GeeCollection* collection);
260 gboolean (*retain_all) (GeeCollection* self, GeeCollection* collection);
261 gpointer* (*to_array) (GeeCollection* self, int* result_length1);
262 gint (*get_size) (GeeCollection* self);
263 gboolean (*get_is_empty) (GeeCollection* self);
264 gboolean (*get_read_only) (GeeCollection* self);
265 GeeCollection* (*get_read_only_view) (GeeCollection* self);
268 struct _GeeSetIface {
269 GTypeInterface parent_iface;
270 GType (*get_g_type) (GeeSet* self);
271 GBoxedCopyFunc (*get_g_dup_func) (GeeSet* self);
272 GDestroyNotify (*get_g_destroy_func) (GeeSet* self);
273 GeeSet* (*get_read_only_view) (GeeSet* self);
276 struct _GeeMapIface {
277 GTypeInterface parent_iface;
278 GType (*get_k_type) (GeeMap* self);
279 GBoxedCopyFunc (*get_k_dup_func) (GeeMap* self);
280 GDestroyNotify (*get_k_destroy_func) (GeeMap* self);
281 GType (*get_v_type) (GeeMap* self);
282 GBoxedCopyFunc (*get_v_dup_func) (GeeMap* self);
283 GDestroyNotify (*get_v_destroy_func) (GeeMap* self);
284 gboolean (*has_key) (GeeMap* self, gconstpointer key);
285 gboolean (*has) (GeeMap* self, gconstpointer key, gconstpointer value);
286 gpointer (*get) (GeeMap* self, gconstpointer key);
287 void (*set) (GeeMap* self, gconstpointer key, gconstpointer value);
288 gboolean (*unset) (GeeMap* self, gconstpointer key, gpointer* value);
289 void (*clear) (GeeMap* self);
290 GeeMapIterator* (*map_iterator) (GeeMap* self);
291 void (*set_all) (GeeMap* self, GeeMap* map);
292 gboolean (*unset_all) (GeeMap* self, GeeMap* map);
293 gboolean (*has_all) (GeeMap* self, GeeMap* map);
294 gint (*get_size) (GeeMap* self);
295 gboolean (*get_is_empty) (GeeMap* self);
296 gboolean (*get_read_only) (GeeMap* self);
297 GeeSet* (*get_keys) (GeeMap* self);
298 GeeCollection* (*get_values) (GeeMap* self);
299 GeeSet* (*get_entries) (GeeMap* self);
300 GeeMap* (*get_read_only_view) (GeeMap* self);
303 struct _GeeSortedSetIface {
304 GTypeInterface parent_iface;
305 GType (*get_g_type) (GeeSortedSet* self);
306 GBoxedCopyFunc (*get_g_dup_func) (GeeSortedSet* self);
307 GDestroyNotify (*get_g_destroy_func) (GeeSortedSet* self);
308 gpointer (*first) (GeeSortedSet* self);
309 gpointer (*last) (GeeSortedSet* self);
310 GeeIterator* (*iterator_at) (GeeSortedSet* self, gconstpointer element);
311 gpointer (*lower) (GeeSortedSet* self, gconstpointer element);
312 gpointer (*higher) (GeeSortedSet* self, gconstpointer element);
313 gpointer (*floor) (GeeSortedSet* self, gconstpointer element);
314 gpointer (*ceil) (GeeSortedSet* self, gconstpointer element);
315 GeeSortedSet* (*head_set) (GeeSortedSet* self, gconstpointer before);
316 GeeSortedSet* (*tail_set) (GeeSortedSet* self, gconstpointer after);
317 GeeSortedSet* (*sub_set) (GeeSortedSet* self, gconstpointer from, gconstpointer to);
318 GeeSortedSet* (*get_read_only_view) (GeeSortedSet* self);
321 struct _GeeSortedMapIface {
322 GTypeInterface parent_iface;
323 GeeSortedMap* (*head_map) (GeeSortedMap* self, gconstpointer before);
324 GeeSortedMap* (*tail_map) (GeeSortedMap* self, gconstpointer after);
325 GeeSortedMap* (*sub_map) (GeeSortedMap* self, gconstpointer before, gconstpointer after);
326 GeeSortedSet* (*get_ascending_keys) (GeeSortedMap* self);
327 GeeSortedSet* (*get_ascending_entries) (GeeSortedMap* self);
328 GeeSortedMap* (*get_read_only_view) (GeeSortedMap* self);
331 struct _GeeBidirMapIteratorIface {
332 GTypeInterface parent_iface;
333 GType (*get_k_type) (GeeBidirMapIterator* self);
334 GBoxedCopyFunc (*get_k_dup_func) (GeeBidirMapIterator* self);
335 GDestroyNotify (*get_k_destroy_func) (GeeBidirMapIterator* self);
336 GType (*get_v_type) (GeeBidirMapIterator* self);
337 GBoxedCopyFunc (*get_v_dup_func) (GeeBidirMapIterator* self);
338 GDestroyNotify (*get_v_destroy_func) (GeeBidirMapIterator* self);
339 gboolean (*previous) (GeeBidirMapIterator* self);
340 gboolean (*has_previous) (GeeBidirMapIterator* self);
341 gboolean (*first) (GeeBidirMapIterator* self);
342 gboolean (*last) (GeeBidirMapIterator* self);
345 struct _GeeBidirSortedMapIface {
346 GTypeInterface parent_iface;
347 GType (*get_k_type) (GeeBidirSortedMap* self);
348 GBoxedCopyFunc (*get_k_dup_func) (GeeBidirSortedMap* self);
349 GDestroyNotify (*get_k_destroy_func) (GeeBidirSortedMap* self);
350 GType (*get_v_type) (GeeBidirSortedMap* self);
351 GBoxedCopyFunc (*get_v_dup_func) (GeeBidirSortedMap* self);
352 GDestroyNotify (*get_v_destroy_func) (GeeBidirSortedMap* self);
353 GeeBidirMapIterator* (*bidir_map_iterator) (GeeBidirSortedMap* self);
354 GeeBidirSortedMap* (*get_read_only_view) (GeeBidirSortedMap* self);
357 typedef gboolean (*GeeEqualDataFunc) (gconstpointer a, gconstpointer b, void* user_data);
360 GType gee_traversable_stream_get_type (void) G_GNUC_CONST;
361 gpointer gee_lazy_ref (gpointer instance);
362 void gee_lazy_unref (gpointer instance);
363 GParamSpec* gee_param_spec_lazy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
364 void gee_value_set_lazy (GValue* value, gpointer v_object);
365 void gee_value_take_lazy (GValue* value, gpointer v_object);
366 gpointer gee_value_get_lazy (const GValue* value);
367 GType gee_lazy_get_type (void) G_GNUC_CONST;
368 GType gee_iterator_get_type (void) G_GNUC_CONST;
369 GType gee_traversable_get_type (void) G_GNUC_CONST;
370 GType gee_iterable_get_type (void) G_GNUC_CONST;
371 GType gee_map_iterator_get_type (void) G_GNUC_CONST;
372 GType gee_collection_get_type (void) G_GNUC_CONST;
373 GType gee_set_get_type (void) G_GNUC_CONST;
374 GType gee_map_entry_get_type (void) G_GNUC_CONST;
375 GType gee_map_get_type (void) G_GNUC_CONST;
376 GType gee_sorted_set_get_type (void) G_GNUC_CONST;
377 GType gee_sorted_map_get_type (void) G_GNUC_CONST;
378 GType gee_bidir_map_iterator_get_type (void) G_GNUC_CONST;
379 GType gee_bidir_sorted_map_get_type (void) G_GNUC_CONST;
380 GeeBidirMapIterator* gee_bidir_sorted_map_bidir_map_iterator (GeeBidirSortedMap* self);
381 GeeBidirSortedMap* gee_bidir_sorted_map_empty (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func);
382 GeeTreeMap* gee_tree_map_new (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, GCompareDataFunc key_compare_func, void* key_compare_func_target, GDestroyNotify key_compare_func_target_destroy_notify, GeeEqualDataFunc value_equal_func, void* value_equal_func_target, GDestroyNotify value_equal_func_target_destroy_notify);
383 GeeTreeMap* gee_tree_map_construct (GType object_type, GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func, GCompareDataFunc key_compare_func, void* key_compare_func_target, GDestroyNotify key_compare_func_target_destroy_notify, GeeEqualDataFunc value_equal_func, void* value_equal_func_target, GDestroyNotify value_equal_func_target_destroy_notify);
384 GType gee_abstract_map_get_type (void) G_GNUC_CONST;
385 GType gee_abstract_sorted_map_get_type (void) G_GNUC_CONST;
386 GType gee_abstract_bidir_sorted_map_get_type (void) G_GNUC_CONST;
387 GType gee_tree_map_get_type (void) G_GNUC_CONST;
388 GeeBidirSortedMap* gee_abstract_bidir_sorted_map_get_read_only_view (GeeAbstractBidirSortedMap* self);
389 GeeBidirSortedMap* gee_bidir_sorted_map_get_read_only_view (GeeBidirSortedMap* self);
393 * Returns a bi-directional iterator for this map.
395 * @return a bi-directional map iterator
397 GeeBidirMapIterator* gee_bidir_sorted_map_bidir_map_iterator (GeeBidirSortedMap* self) {
398 g_return_val_if_fail (self != NULL, NULL);
399 return GEE_BIDIR_SORTED_MAP_GET_INTERFACE (self)->bidir_map_iterator (self);
404 * Returns an immutable empty sorted set.
406 * @return an immutable empty sorted set
408 GeeBidirSortedMap* gee_bidir_sorted_map_empty (GType k_type, GBoxedCopyFunc k_dup_func, GDestroyNotify k_destroy_func, GType v_type, GBoxedCopyFunc v_dup_func, GDestroyNotify v_destroy_func) {
409 GeeBidirSortedMap* result = NULL;
412 GeeBidirSortedMap* _tmp2_;
413 GeeBidirSortedMap* _tmp3_;
414 GeeBidirSortedMap* _tmp4_;
415 _tmp0_ = gee_tree_map_new (k_type, (GBoxedCopyFunc) k_dup_func, k_destroy_func, v_type, (GBoxedCopyFunc) v_dup_func, v_destroy_func, NULL, NULL, NULL, NULL, NULL, NULL);
417 _tmp2_ = gee_abstract_bidir_sorted_map_get_read_only_view ((GeeAbstractBidirSortedMap*) _tmp1_);
420 _g_object_unref0 (_tmp1_);
426 GeeBidirSortedMap* gee_bidir_sorted_map_get_read_only_view (GeeBidirSortedMap* self) {
427 g_return_val_if_fail (self != NULL, NULL);
428 return GEE_BIDIR_SORTED_MAP_GET_INTERFACE (self)->get_read_only_view (self);
432 static void gee_bidir_sorted_map_base_init (GeeBidirSortedMapIface * iface) {
433 static gboolean initialized = FALSE;
437 * The read-only view of this set.
439 g_object_interface_install_property (iface, g_param_spec_object ("read-only-view", "read-only-view", "read-only-view", GEE_TYPE_BIDIR_SORTED_MAP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
444 GType gee_bidir_sorted_map_get_type (void) {
445 static volatile gsize gee_bidir_sorted_map_type_id__volatile = 0;
446 if (g_once_init_enter (&gee_bidir_sorted_map_type_id__volatile)) {
447 static const GTypeInfo g_define_type_info = { sizeof (GeeBidirSortedMapIface), (GBaseInitFunc) gee_bidir_sorted_map_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
448 GType gee_bidir_sorted_map_type_id;
449 gee_bidir_sorted_map_type_id = g_type_register_static (G_TYPE_INTERFACE, "GeeBidirSortedMap", &g_define_type_info, 0);
450 g_type_interface_add_prerequisite (gee_bidir_sorted_map_type_id, GEE_TYPE_SORTED_MAP);
451 g_once_init_leave (&gee_bidir_sorted_map_type_id__volatile, gee_bidir_sorted_map_type_id);
453 return gee_bidir_sorted_map_type_id__volatile;