Update Changelog
[profile/ivi/libgee.git] / gee / abstractset.c
1 /* abstractset.c generated by valac 0.18.0, the Vala compiler
2  * generated from abstractset.vala, do not modify */
3
4 /* abstractset.vala
5  *
6  * Copyright (C) 2007  Jürg Billeter
7  * Copyright (C) 2009  Didier Villevalois
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
22  *
23  * Author:
24  *      Julien Peeters <contact@julienpeeters.fr>
25  */
26
27 #include <glib.h>
28 #include <glib-object.h>
29
30
31 #define GEE_TYPE_TRAVERSABLE (gee_traversable_get_type ())
32 #define GEE_TRAVERSABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TRAVERSABLE, GeeTraversable))
33 #define GEE_IS_TRAVERSABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TRAVERSABLE))
34 #define GEE_TRAVERSABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_TRAVERSABLE, GeeTraversableIface))
35
36 typedef struct _GeeTraversable GeeTraversable;
37 typedef struct _GeeTraversableIface GeeTraversableIface;
38
39 #define GEE_TRAVERSABLE_TYPE_STREAM (gee_traversable_stream_get_type ())
40
41 #define GEE_TYPE_LAZY (gee_lazy_get_type ())
42 #define GEE_LAZY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_LAZY, GeeLazy))
43 #define GEE_LAZY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_LAZY, GeeLazyClass))
44 #define GEE_IS_LAZY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_LAZY))
45 #define GEE_IS_LAZY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_LAZY))
46 #define GEE_LAZY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_LAZY, GeeLazyClass))
47
48 typedef struct _GeeLazy GeeLazy;
49 typedef struct _GeeLazyClass GeeLazyClass;
50
51 #define GEE_TYPE_ITERATOR (gee_iterator_get_type ())
52 #define GEE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERATOR, GeeIterator))
53 #define GEE_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ITERATOR))
54 #define GEE_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_ITERATOR, GeeIteratorIface))
55
56 typedef struct _GeeIterator GeeIterator;
57 typedef struct _GeeIteratorIface GeeIteratorIface;
58
59 #define GEE_TYPE_ITERABLE (gee_iterable_get_type ())
60 #define GEE_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERABLE, GeeIterable))
61 #define GEE_IS_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ITERABLE))
62 #define GEE_ITERABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_ITERABLE, GeeIterableIface))
63
64 typedef struct _GeeIterable GeeIterable;
65 typedef struct _GeeIterableIface GeeIterableIface;
66
67 #define GEE_TYPE_COLLECTION (gee_collection_get_type ())
68 #define GEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_COLLECTION, GeeCollection))
69 #define GEE_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_COLLECTION))
70 #define GEE_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_COLLECTION, GeeCollectionIface))
71
72 typedef struct _GeeCollection GeeCollection;
73 typedef struct _GeeCollectionIface GeeCollectionIface;
74
75 #define GEE_TYPE_ABSTRACT_COLLECTION (gee_abstract_collection_get_type ())
76 #define GEE_ABSTRACT_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection))
77 #define GEE_ABSTRACT_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollectionClass))
78 #define GEE_IS_ABSTRACT_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_COLLECTION))
79 #define GEE_IS_ABSTRACT_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_COLLECTION))
80 #define GEE_ABSTRACT_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollectionClass))
81
82 typedef struct _GeeAbstractCollection GeeAbstractCollection;
83 typedef struct _GeeAbstractCollectionClass GeeAbstractCollectionClass;
84 typedef struct _GeeAbstractCollectionPrivate GeeAbstractCollectionPrivate;
85
86 #define GEE_TYPE_SET (gee_set_get_type ())
87 #define GEE_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SET, GeeSet))
88 #define GEE_IS_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SET))
89 #define GEE_SET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_SET, GeeSetIface))
90
91 typedef struct _GeeSet GeeSet;
92 typedef struct _GeeSetIface GeeSetIface;
93
94 #define GEE_TYPE_ABSTRACT_SET (gee_abstract_set_get_type ())
95 #define GEE_ABSTRACT_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_SET, GeeAbstractSet))
96 #define GEE_ABSTRACT_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_SET, GeeAbstractSetClass))
97 #define GEE_IS_ABSTRACT_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_SET))
98 #define GEE_IS_ABSTRACT_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_SET))
99 #define GEE_ABSTRACT_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_SET, GeeAbstractSetClass))
100
101 typedef struct _GeeAbstractSet GeeAbstractSet;
102 typedef struct _GeeAbstractSetClass GeeAbstractSetClass;
103 typedef struct _GeeAbstractSetPrivate GeeAbstractSetPrivate;
104
105 #define GEE_TYPE_READ_ONLY_COLLECTION (gee_read_only_collection_get_type ())
106 #define GEE_READ_ONLY_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_READ_ONLY_COLLECTION, GeeReadOnlyCollection))
107 #define GEE_READ_ONLY_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_READ_ONLY_COLLECTION, GeeReadOnlyCollectionClass))
108 #define GEE_IS_READ_ONLY_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_READ_ONLY_COLLECTION))
109 #define GEE_IS_READ_ONLY_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_READ_ONLY_COLLECTION))
110 #define GEE_READ_ONLY_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_READ_ONLY_COLLECTION, GeeReadOnlyCollectionClass))
111
112 typedef struct _GeeReadOnlyCollection GeeReadOnlyCollection;
113 typedef struct _GeeReadOnlyCollectionClass GeeReadOnlyCollectionClass;
114
115 #define GEE_TYPE_READ_ONLY_SET (gee_read_only_set_get_type ())
116 #define GEE_READ_ONLY_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_READ_ONLY_SET, GeeReadOnlySet))
117 #define GEE_READ_ONLY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_READ_ONLY_SET, GeeReadOnlySetClass))
118 #define GEE_IS_READ_ONLY_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_READ_ONLY_SET))
119 #define GEE_IS_READ_ONLY_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_READ_ONLY_SET))
120 #define GEE_READ_ONLY_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_READ_ONLY_SET, GeeReadOnlySetClass))
121
122 typedef struct _GeeReadOnlySet GeeReadOnlySet;
123 typedef struct _GeeReadOnlySetClass GeeReadOnlySetClass;
124 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
125
126 typedef gboolean (*GeeForallFunc) (gpointer g, void* user_data);
127 typedef enum  {
128         GEE_TRAVERSABLE_STREAM_YIELD,
129         GEE_TRAVERSABLE_STREAM_CONTINUE,
130         GEE_TRAVERSABLE_STREAM_END
131 } GeeTraversableStream;
132
133 typedef GeeTraversableStream (*GeeStreamFunc) (GeeTraversableStream state, GeeLazy* g, GeeLazy** lazy, void* user_data);
134 struct _GeeIteratorIface {
135         GTypeInterface parent_iface;
136         gboolean (*next) (GeeIterator* self);
137         gboolean (*has_next) (GeeIterator* self);
138         gpointer (*get) (GeeIterator* self);
139         void (*remove) (GeeIterator* self);
140         gboolean (*get_valid) (GeeIterator* self);
141         gboolean (*get_read_only) (GeeIterator* self);
142 };
143
144 typedef gpointer (*GeeFoldFunc) (gpointer g, gpointer a, void* user_data);
145 typedef gpointer (*GeeMapFunc) (gpointer g, void* user_data);
146 typedef gboolean (*GeePredicate) (gconstpointer g, void* user_data);
147 struct _GeeTraversableIface {
148         GTypeInterface parent_iface;
149         GType (*get_g_type) (GeeTraversable* self);
150         GBoxedCopyFunc (*get_g_dup_func) (GeeTraversable* self);
151         GDestroyNotify (*get_g_destroy_func) (GeeTraversable* self);
152         gboolean (*foreach) (GeeTraversable* self, GeeForallFunc f, void* f_target);
153         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);
154         gpointer (*fold) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
155         GeeIterator* (*map) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeMapFunc f, void* f_target);
156         GeeIterator* (*scan) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
157         GeeIterator* (*filter) (GeeTraversable* self, GeePredicate pred, void* pred_target, GDestroyNotify pred_target_destroy_notify);
158         GeeIterator* (*chop) (GeeTraversable* self, gint offset, gint length);
159         GType (*get_element_type) (GeeTraversable* self);
160 };
161
162 struct _GeeIterableIface {
163         GTypeInterface parent_iface;
164         GType (*get_g_type) (GeeIterable* self);
165         GBoxedCopyFunc (*get_g_dup_func) (GeeIterable* self);
166         GDestroyNotify (*get_g_destroy_func) (GeeIterable* self);
167         GeeIterator* (*iterator) (GeeIterable* self);
168 };
169
170 struct _GeeCollectionIface {
171         GTypeInterface parent_iface;
172         GType (*get_g_type) (GeeCollection* self);
173         GBoxedCopyFunc (*get_g_dup_func) (GeeCollection* self);
174         GDestroyNotify (*get_g_destroy_func) (GeeCollection* self);
175         gboolean (*contains) (GeeCollection* self, gconstpointer item);
176         gboolean (*add) (GeeCollection* self, gconstpointer item);
177         gboolean (*remove) (GeeCollection* self, gconstpointer item);
178         void (*clear) (GeeCollection* self);
179         gboolean (*add_all) (GeeCollection* self, GeeCollection* collection);
180         gboolean (*contains_all) (GeeCollection* self, GeeCollection* collection);
181         gboolean (*remove_all) (GeeCollection* self, GeeCollection* collection);
182         gboolean (*retain_all) (GeeCollection* self, GeeCollection* collection);
183         gpointer* (*to_array) (GeeCollection* self, int* result_length1);
184         gint (*get_size) (GeeCollection* self);
185         gboolean (*get_is_empty) (GeeCollection* self);
186         gboolean (*get_read_only) (GeeCollection* self);
187         GeeCollection* (*get_read_only_view) (GeeCollection* self);
188 };
189
190 struct _GeeAbstractCollection {
191         GObject parent_instance;
192         GeeAbstractCollectionPrivate * priv;
193 };
194
195 struct _GeeAbstractCollectionClass {
196         GObjectClass parent_class;
197         gboolean (*contains) (GeeAbstractCollection* self, gconstpointer item);
198         gboolean (*add) (GeeAbstractCollection* self, gconstpointer item);
199         gboolean (*remove) (GeeAbstractCollection* self, gconstpointer item);
200         void (*clear) (GeeAbstractCollection* self);
201         GeeIterator* (*iterator) (GeeAbstractCollection* self);
202         gboolean (*foreach) (GeeAbstractCollection* self, GeeForallFunc f, void* f_target);
203         void (*reserved0) (GeeAbstractCollection* self);
204         void (*reserved1) (GeeAbstractCollection* self);
205         void (*reserved2) (GeeAbstractCollection* self);
206         void (*reserved3) (GeeAbstractCollection* self);
207         void (*reserved4) (GeeAbstractCollection* self);
208         void (*reserved5) (GeeAbstractCollection* self);
209         void (*reserved6) (GeeAbstractCollection* self);
210         void (*reserved7) (GeeAbstractCollection* self);
211         void (*reserved8) (GeeAbstractCollection* self);
212         void (*reserved9) (GeeAbstractCollection* self);
213         gint (*get_size) (GeeAbstractCollection* self);
214         gboolean (*get_read_only) (GeeAbstractCollection* self);
215         GeeCollection* (*get_read_only_view) (GeeAbstractCollection* self);
216 };
217
218 struct _GeeSetIface {
219         GTypeInterface parent_iface;
220         GType (*get_g_type) (GeeSet* self);
221         GBoxedCopyFunc (*get_g_dup_func) (GeeSet* self);
222         GDestroyNotify (*get_g_destroy_func) (GeeSet* self);
223         GeeSet* (*get_read_only_view) (GeeSet* self);
224 };
225
226 struct _GeeAbstractSet {
227         GeeAbstractCollection parent_instance;
228         GeeAbstractSetPrivate * priv;
229 };
230
231 struct _GeeAbstractSetClass {
232         GeeAbstractCollectionClass parent_class;
233         void (*reserved0) (GeeAbstractSet* self);
234         void (*reserved1) (GeeAbstractSet* self);
235         void (*reserved2) (GeeAbstractSet* self);
236         void (*reserved3) (GeeAbstractSet* self);
237         void (*reserved4) (GeeAbstractSet* self);
238         void (*reserved5) (GeeAbstractSet* self);
239         void (*reserved6) (GeeAbstractSet* self);
240         void (*reserved7) (GeeAbstractSet* self);
241         void (*reserved8) (GeeAbstractSet* self);
242         void (*reserved9) (GeeAbstractSet* self);
243         GeeSet* (*get_read_only_view) (GeeAbstractSet* self);
244 };
245
246 struct _GeeAbstractSetPrivate {
247         GType g_type;
248         GBoxedCopyFunc g_dup_func;
249         GDestroyNotify g_destroy_func;
250         GeeSet* _read_only_view;
251 };
252
253
254 static gpointer gee_abstract_set_parent_class = NULL;
255 static GeeSetIface* gee_abstract_set_gee_set_parent_iface = NULL;
256
257 GType gee_traversable_stream_get_type (void) G_GNUC_CONST;
258 gpointer gee_lazy_ref (gpointer instance);
259 void gee_lazy_unref (gpointer instance);
260 GParamSpec* gee_param_spec_lazy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
261 void gee_value_set_lazy (GValue* value, gpointer v_object);
262 void gee_value_take_lazy (GValue* value, gpointer v_object);
263 gpointer gee_value_get_lazy (const GValue* value);
264 GType gee_lazy_get_type (void) G_GNUC_CONST;
265 GType gee_iterator_get_type (void) G_GNUC_CONST;
266 GType gee_traversable_get_type (void) G_GNUC_CONST;
267 GType gee_iterable_get_type (void) G_GNUC_CONST;
268 GType gee_collection_get_type (void) G_GNUC_CONST;
269 GType gee_abstract_collection_get_type (void) G_GNUC_CONST;
270 GType gee_set_get_type (void) G_GNUC_CONST;
271 GType gee_abstract_set_get_type (void) G_GNUC_CONST;
272 #define GEE_ABSTRACT_SET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GEE_TYPE_ABSTRACT_SET, GeeAbstractSetPrivate))
273 enum  {
274         GEE_ABSTRACT_SET_DUMMY_PROPERTY,
275         GEE_ABSTRACT_SET_G_TYPE,
276         GEE_ABSTRACT_SET_G_DUP_FUNC,
277         GEE_ABSTRACT_SET_G_DESTROY_FUNC,
278         GEE_ABSTRACT_SET_READ_ONLY_VIEW
279 };
280 void gee_abstract_set_reserved0 (GeeAbstractSet* self);
281 static void gee_abstract_set_real_reserved0 (GeeAbstractSet* self);
282 void gee_abstract_set_reserved1 (GeeAbstractSet* self);
283 static void gee_abstract_set_real_reserved1 (GeeAbstractSet* self);
284 void gee_abstract_set_reserved2 (GeeAbstractSet* self);
285 static void gee_abstract_set_real_reserved2 (GeeAbstractSet* self);
286 void gee_abstract_set_reserved3 (GeeAbstractSet* self);
287 static void gee_abstract_set_real_reserved3 (GeeAbstractSet* self);
288 void gee_abstract_set_reserved4 (GeeAbstractSet* self);
289 static void gee_abstract_set_real_reserved4 (GeeAbstractSet* self);
290 void gee_abstract_set_reserved5 (GeeAbstractSet* self);
291 static void gee_abstract_set_real_reserved5 (GeeAbstractSet* self);
292 void gee_abstract_set_reserved6 (GeeAbstractSet* self);
293 static void gee_abstract_set_real_reserved6 (GeeAbstractSet* self);
294 void gee_abstract_set_reserved7 (GeeAbstractSet* self);
295 static void gee_abstract_set_real_reserved7 (GeeAbstractSet* self);
296 void gee_abstract_set_reserved8 (GeeAbstractSet* self);
297 static void gee_abstract_set_real_reserved8 (GeeAbstractSet* self);
298 void gee_abstract_set_reserved9 (GeeAbstractSet* self);
299 static void gee_abstract_set_real_reserved9 (GeeAbstractSet* self);
300 GeeAbstractSet* gee_abstract_set_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
301 GeeAbstractCollection* gee_abstract_collection_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
302 GeeSet* gee_abstract_set_get_read_only_view (GeeAbstractSet* self);
303 GeeReadOnlySet* gee_read_only_set_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeSet* set);
304 GeeReadOnlySet* gee_read_only_set_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GeeSet* set);
305 GType gee_read_only_collection_get_type (void) G_GNUC_CONST;
306 GType gee_read_only_set_get_type (void) G_GNUC_CONST;
307 static void gee_abstract_set_finalize (GObject* obj);
308 static void _vala_gee_abstract_set_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
309 static void _vala_gee_abstract_set_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
310
311
312 static void gee_abstract_set_real_reserved0 (GeeAbstractSet* self) {
313 }
314
315
316 void gee_abstract_set_reserved0 (GeeAbstractSet* self) {
317         g_return_if_fail (self != NULL);
318         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved0 (self);
319 }
320
321
322 static void gee_abstract_set_real_reserved1 (GeeAbstractSet* self) {
323 }
324
325
326 void gee_abstract_set_reserved1 (GeeAbstractSet* self) {
327         g_return_if_fail (self != NULL);
328         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved1 (self);
329 }
330
331
332 static void gee_abstract_set_real_reserved2 (GeeAbstractSet* self) {
333 }
334
335
336 void gee_abstract_set_reserved2 (GeeAbstractSet* self) {
337         g_return_if_fail (self != NULL);
338         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved2 (self);
339 }
340
341
342 static void gee_abstract_set_real_reserved3 (GeeAbstractSet* self) {
343 }
344
345
346 void gee_abstract_set_reserved3 (GeeAbstractSet* self) {
347         g_return_if_fail (self != NULL);
348         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved3 (self);
349 }
350
351
352 static void gee_abstract_set_real_reserved4 (GeeAbstractSet* self) {
353 }
354
355
356 void gee_abstract_set_reserved4 (GeeAbstractSet* self) {
357         g_return_if_fail (self != NULL);
358         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved4 (self);
359 }
360
361
362 static void gee_abstract_set_real_reserved5 (GeeAbstractSet* self) {
363 }
364
365
366 void gee_abstract_set_reserved5 (GeeAbstractSet* self) {
367         g_return_if_fail (self != NULL);
368         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved5 (self);
369 }
370
371
372 static void gee_abstract_set_real_reserved6 (GeeAbstractSet* self) {
373 }
374
375
376 void gee_abstract_set_reserved6 (GeeAbstractSet* self) {
377         g_return_if_fail (self != NULL);
378         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved6 (self);
379 }
380
381
382 static void gee_abstract_set_real_reserved7 (GeeAbstractSet* self) {
383 }
384
385
386 void gee_abstract_set_reserved7 (GeeAbstractSet* self) {
387         g_return_if_fail (self != NULL);
388         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved7 (self);
389 }
390
391
392 static void gee_abstract_set_real_reserved8 (GeeAbstractSet* self) {
393 }
394
395
396 void gee_abstract_set_reserved8 (GeeAbstractSet* self) {
397         g_return_if_fail (self != NULL);
398         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved8 (self);
399 }
400
401
402 static void gee_abstract_set_real_reserved9 (GeeAbstractSet* self) {
403 }
404
405
406 void gee_abstract_set_reserved9 (GeeAbstractSet* self) {
407         g_return_if_fail (self != NULL);
408         GEE_ABSTRACT_SET_GET_CLASS (self)->reserved9 (self);
409 }
410
411
412 GeeAbstractSet* gee_abstract_set_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func) {
413         GeeAbstractSet * self = NULL;
414         self = (GeeAbstractSet*) gee_abstract_collection_construct (object_type, g_type, (GBoxedCopyFunc) g_dup_func, g_destroy_func);
415         self->priv->g_type = g_type;
416         self->priv->g_dup_func = g_dup_func;
417         self->priv->g_destroy_func = g_destroy_func;
418         return self;
419 }
420
421
422 GeeSet* gee_abstract_set_get_read_only_view (GeeAbstractSet* self) {
423         g_return_val_if_fail (self != NULL, NULL);
424         return GEE_ABSTRACT_SET_GET_CLASS (self)->get_read_only_view (self);
425 }
426
427
428 static gpointer _g_object_ref0 (gpointer self) {
429         return self ? g_object_ref (self) : NULL;
430 }
431
432
433 static GeeSet* gee_abstract_set_real_get_read_only_view (GeeAbstractSet* base) {
434         GeeSet* result;
435         GeeAbstractSet* self;
436         GeeSet* _tmp0_;
437         GeeSet* _tmp1_;
438         GeeSet* instance;
439         GeeSet* _tmp2_;
440         self = base;
441         _tmp0_ = self->priv->_read_only_view;
442         _tmp1_ = _g_object_ref0 (_tmp0_);
443         instance = _tmp1_;
444         _tmp2_ = self->priv->_read_only_view;
445         if (_tmp2_ == NULL) {
446                 GeeReadOnlySet* _tmp3_;
447                 GeeSet* _tmp4_;
448                 GeeSet* _tmp5_;
449                 _tmp3_ = gee_read_only_set_new (self->priv->g_type, (GBoxedCopyFunc) self->priv->g_dup_func, self->priv->g_destroy_func, (GeeSet*) self);
450                 _g_object_unref0 (instance);
451                 instance = (GeeSet*) _tmp3_;
452                 _tmp4_ = instance;
453                 self->priv->_read_only_view = _tmp4_;
454                 _tmp5_ = instance;
455                 g_object_add_weak_pointer ((GObject*) _tmp5_, (void**) (&self->priv->_read_only_view));
456         }
457         result = instance;
458         return result;
459 }
460
461
462 static void gee_abstract_set_class_init (GeeAbstractSetClass * klass) {
463         gee_abstract_set_parent_class = g_type_class_peek_parent (klass);
464         g_type_class_add_private (klass, sizeof (GeeAbstractSetPrivate));
465         GEE_ABSTRACT_SET_CLASS (klass)->reserved0 = gee_abstract_set_real_reserved0;
466         GEE_ABSTRACT_SET_CLASS (klass)->reserved1 = gee_abstract_set_real_reserved1;
467         GEE_ABSTRACT_SET_CLASS (klass)->reserved2 = gee_abstract_set_real_reserved2;
468         GEE_ABSTRACT_SET_CLASS (klass)->reserved3 = gee_abstract_set_real_reserved3;
469         GEE_ABSTRACT_SET_CLASS (klass)->reserved4 = gee_abstract_set_real_reserved4;
470         GEE_ABSTRACT_SET_CLASS (klass)->reserved5 = gee_abstract_set_real_reserved5;
471         GEE_ABSTRACT_SET_CLASS (klass)->reserved6 = gee_abstract_set_real_reserved6;
472         GEE_ABSTRACT_SET_CLASS (klass)->reserved7 = gee_abstract_set_real_reserved7;
473         GEE_ABSTRACT_SET_CLASS (klass)->reserved8 = gee_abstract_set_real_reserved8;
474         GEE_ABSTRACT_SET_CLASS (klass)->reserved9 = gee_abstract_set_real_reserved9;
475         GEE_ABSTRACT_SET_CLASS (klass)->get_read_only_view = gee_abstract_set_real_get_read_only_view;
476         G_OBJECT_CLASS (klass)->get_property = _vala_gee_abstract_set_get_property;
477         G_OBJECT_CLASS (klass)->set_property = _vala_gee_abstract_set_set_property;
478         G_OBJECT_CLASS (klass)->finalize = gee_abstract_set_finalize;
479         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_SET_G_TYPE, g_param_spec_gtype ("g-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
480         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_SET_G_DUP_FUNC, g_param_spec_pointer ("g-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
481         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_SET_G_DESTROY_FUNC, g_param_spec_pointer ("g-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
482         /**
483          * {@inheritDoc}
484          */
485         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_SET_READ_ONLY_VIEW, g_param_spec_object ("read-only-view", "read-only-view", "read-only-view", GEE_TYPE_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
486 }
487
488
489 static GType gee_abstract_set_gee_set_get_g_type (GeeAbstractSet* self) {
490         return self->priv->g_type;
491 }
492
493
494 static GBoxedCopyFunc gee_abstract_set_gee_set_get_g_dup_func (GeeAbstractSet* self) {
495         return self->priv->g_dup_func;
496 }
497
498
499 static GDestroyNotify gee_abstract_set_gee_set_get_g_destroy_func (GeeAbstractSet* self) {
500         return self->priv->g_destroy_func;
501 }
502
503
504 static void gee_abstract_set_gee_set_interface_init (GeeSetIface * iface) {
505         gee_abstract_set_gee_set_parent_iface = g_type_interface_peek_parent (iface);
506         iface->get_g_type = (GType(*)(GeeSet*)) gee_abstract_set_gee_set_get_g_type;
507         iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeSet*)) gee_abstract_set_gee_set_get_g_dup_func;
508         iface->get_g_destroy_func = (GDestroyNotify(*)(GeeSet*)) gee_abstract_set_gee_set_get_g_destroy_func;
509         iface->get_read_only_view = (GeeSet* (*) (GeeSet *)) gee_abstract_set_get_read_only_view;
510 }
511
512
513 static void gee_abstract_set_instance_init (GeeAbstractSet * self) {
514         self->priv = GEE_ABSTRACT_SET_GET_PRIVATE (self);
515 }
516
517
518 static void gee_abstract_set_finalize (GObject* obj) {
519         GeeAbstractSet * self;
520         self = G_TYPE_CHECK_INSTANCE_CAST (obj, GEE_TYPE_ABSTRACT_SET, GeeAbstractSet);
521         G_OBJECT_CLASS (gee_abstract_set_parent_class)->finalize (obj);
522 }
523
524
525 /**
526  * Skeletal implementation of the {@link Set} interface.
527  *
528  * Contains common code shared by all set implementations.
529  *
530  * @see HashSet
531  * @see TreeSet
532  */
533 GType gee_abstract_set_get_type (void) {
534         static volatile gsize gee_abstract_set_type_id__volatile = 0;
535         if (g_once_init_enter (&gee_abstract_set_type_id__volatile)) {
536                 static const GTypeInfo g_define_type_info = { sizeof (GeeAbstractSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_abstract_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeAbstractSet), 0, (GInstanceInitFunc) gee_abstract_set_instance_init, NULL };
537                 static const GInterfaceInfo gee_set_info = { (GInterfaceInitFunc) gee_abstract_set_gee_set_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
538                 GType gee_abstract_set_type_id;
539                 gee_abstract_set_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_COLLECTION, "GeeAbstractSet", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
540                 g_type_add_interface_static (gee_abstract_set_type_id, GEE_TYPE_SET, &gee_set_info);
541                 g_once_init_leave (&gee_abstract_set_type_id__volatile, gee_abstract_set_type_id);
542         }
543         return gee_abstract_set_type_id__volatile;
544 }
545
546
547 static void _vala_gee_abstract_set_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
548         GeeAbstractSet * self;
549         self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_ABSTRACT_SET, GeeAbstractSet);
550         switch (property_id) {
551                 case GEE_ABSTRACT_SET_READ_ONLY_VIEW:
552                 g_value_take_object (value, gee_abstract_set_get_read_only_view (self));
553                 break;
554                 default:
555                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
556                 break;
557         }
558 }
559
560
561 static void _vala_gee_abstract_set_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
562         GeeAbstractSet * self;
563         self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_ABSTRACT_SET, GeeAbstractSet);
564         switch (property_id) {
565                 case GEE_ABSTRACT_SET_G_TYPE:
566                 self->priv->g_type = g_value_get_gtype (value);
567                 break;
568                 case GEE_ABSTRACT_SET_G_DUP_FUNC:
569                 self->priv->g_dup_func = g_value_get_pointer (value);
570                 break;
571                 case GEE_ABSTRACT_SET_G_DESTROY_FUNC:
572                 self->priv->g_destroy_func = g_value_get_pointer (value);
573                 break;
574                 default:
575                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
576                 break;
577         }
578 }
579
580
581