Update Changelog
[profile/ivi/libgee.git] / gee / abstractqueue.c
1 /* abstractqueue.c generated by valac 0.18.0, the Vala compiler
2  * generated from abstractqueue.vala, do not modify */
3
4 /* abstractqueue.vala
5  *
6  * Copyright (C) 2009  Didier Villevalois
7  *
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.
12
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.
17
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
21  *
22  * Author:
23  *      Didier 'Ptitjes Villevalois <ptitjes@free.fr>
24  */
25
26 #include <glib.h>
27 #include <glib-object.h>
28
29
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))
34
35 typedef struct _GeeTraversable GeeTraversable;
36 typedef struct _GeeTraversableIface GeeTraversableIface;
37
38 #define GEE_TRAVERSABLE_TYPE_STREAM (gee_traversable_stream_get_type ())
39
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))
46
47 typedef struct _GeeLazy GeeLazy;
48 typedef struct _GeeLazyClass GeeLazyClass;
49
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))
54
55 typedef struct _GeeIterator GeeIterator;
56 typedef struct _GeeIteratorIface GeeIteratorIface;
57
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))
62
63 typedef struct _GeeIterable GeeIterable;
64 typedef struct _GeeIterableIface GeeIterableIface;
65
66 #define GEE_TYPE_COLLECTION (gee_collection_get_type ())
67 #define GEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_COLLECTION, GeeCollection))
68 #define GEE_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_COLLECTION))
69 #define GEE_COLLECTION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_COLLECTION, GeeCollectionIface))
70
71 typedef struct _GeeCollection GeeCollection;
72 typedef struct _GeeCollectionIface GeeCollectionIface;
73
74 #define GEE_TYPE_ABSTRACT_COLLECTION (gee_abstract_collection_get_type ())
75 #define GEE_ABSTRACT_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection))
76 #define GEE_ABSTRACT_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollectionClass))
77 #define GEE_IS_ABSTRACT_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_COLLECTION))
78 #define GEE_IS_ABSTRACT_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_COLLECTION))
79 #define GEE_ABSTRACT_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollectionClass))
80
81 typedef struct _GeeAbstractCollection GeeAbstractCollection;
82 typedef struct _GeeAbstractCollectionClass GeeAbstractCollectionClass;
83 typedef struct _GeeAbstractCollectionPrivate GeeAbstractCollectionPrivate;
84
85 #define GEE_TYPE_QUEUE (gee_queue_get_type ())
86 #define GEE_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_QUEUE, GeeQueue))
87 #define GEE_IS_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_QUEUE))
88 #define GEE_QUEUE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_QUEUE, GeeQueueIface))
89
90 typedef struct _GeeQueue GeeQueue;
91 typedef struct _GeeQueueIface GeeQueueIface;
92
93 #define GEE_TYPE_ABSTRACT_QUEUE (gee_abstract_queue_get_type ())
94 #define GEE_ABSTRACT_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_QUEUE, GeeAbstractQueue))
95 #define GEE_ABSTRACT_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_QUEUE, GeeAbstractQueueClass))
96 #define GEE_IS_ABSTRACT_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_QUEUE))
97 #define GEE_IS_ABSTRACT_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_QUEUE))
98 #define GEE_ABSTRACT_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_QUEUE, GeeAbstractQueueClass))
99
100 typedef struct _GeeAbstractQueue GeeAbstractQueue;
101 typedef struct _GeeAbstractQueueClass GeeAbstractQueueClass;
102 typedef struct _GeeAbstractQueuePrivate GeeAbstractQueuePrivate;
103
104 typedef gboolean (*GeeForallFunc) (gpointer g, void* user_data);
105 typedef enum  {
106         GEE_TRAVERSABLE_STREAM_YIELD,
107         GEE_TRAVERSABLE_STREAM_CONTINUE,
108         GEE_TRAVERSABLE_STREAM_END
109 } GeeTraversableStream;
110
111 typedef GeeTraversableStream (*GeeStreamFunc) (GeeTraversableStream state, GeeLazy* g, GeeLazy** lazy, void* user_data);
112 struct _GeeIteratorIface {
113         GTypeInterface parent_iface;
114         gboolean (*next) (GeeIterator* self);
115         gboolean (*has_next) (GeeIterator* self);
116         gpointer (*get) (GeeIterator* self);
117         void (*remove) (GeeIterator* self);
118         gboolean (*get_valid) (GeeIterator* self);
119         gboolean (*get_read_only) (GeeIterator* self);
120 };
121
122 typedef gpointer (*GeeFoldFunc) (gpointer g, gpointer a, void* user_data);
123 typedef gpointer (*GeeMapFunc) (gpointer g, void* user_data);
124 typedef gboolean (*GeePredicate) (gconstpointer g, void* user_data);
125 struct _GeeTraversableIface {
126         GTypeInterface parent_iface;
127         GType (*get_g_type) (GeeTraversable* self);
128         GBoxedCopyFunc (*get_g_dup_func) (GeeTraversable* self);
129         GDestroyNotify (*get_g_destroy_func) (GeeTraversable* self);
130         gboolean (*foreach) (GeeTraversable* self, GeeForallFunc f, void* f_target);
131         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);
132         gpointer (*fold) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
133         GeeIterator* (*map) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeMapFunc f, void* f_target);
134         GeeIterator* (*scan) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
135         GeeIterator* (*filter) (GeeTraversable* self, GeePredicate pred, void* pred_target, GDestroyNotify pred_target_destroy_notify);
136         GeeIterator* (*chop) (GeeTraversable* self, gint offset, gint length);
137         GType (*get_element_type) (GeeTraversable* self);
138 };
139
140 struct _GeeIterableIface {
141         GTypeInterface parent_iface;
142         GType (*get_g_type) (GeeIterable* self);
143         GBoxedCopyFunc (*get_g_dup_func) (GeeIterable* self);
144         GDestroyNotify (*get_g_destroy_func) (GeeIterable* self);
145         GeeIterator* (*iterator) (GeeIterable* self);
146 };
147
148 struct _GeeCollectionIface {
149         GTypeInterface parent_iface;
150         GType (*get_g_type) (GeeCollection* self);
151         GBoxedCopyFunc (*get_g_dup_func) (GeeCollection* self);
152         GDestroyNotify (*get_g_destroy_func) (GeeCollection* self);
153         gboolean (*contains) (GeeCollection* self, gconstpointer item);
154         gboolean (*add) (GeeCollection* self, gconstpointer item);
155         gboolean (*remove) (GeeCollection* self, gconstpointer item);
156         void (*clear) (GeeCollection* self);
157         gboolean (*add_all) (GeeCollection* self, GeeCollection* collection);
158         gboolean (*contains_all) (GeeCollection* self, GeeCollection* collection);
159         gboolean (*remove_all) (GeeCollection* self, GeeCollection* collection);
160         gboolean (*retain_all) (GeeCollection* self, GeeCollection* collection);
161         gpointer* (*to_array) (GeeCollection* self, int* result_length1);
162         gint (*get_size) (GeeCollection* self);
163         gboolean (*get_is_empty) (GeeCollection* self);
164         gboolean (*get_read_only) (GeeCollection* self);
165         GeeCollection* (*get_read_only_view) (GeeCollection* self);
166 };
167
168 struct _GeeAbstractCollection {
169         GObject parent_instance;
170         GeeAbstractCollectionPrivate * priv;
171 };
172
173 struct _GeeAbstractCollectionClass {
174         GObjectClass parent_class;
175         gboolean (*contains) (GeeAbstractCollection* self, gconstpointer item);
176         gboolean (*add) (GeeAbstractCollection* self, gconstpointer item);
177         gboolean (*remove) (GeeAbstractCollection* self, gconstpointer item);
178         void (*clear) (GeeAbstractCollection* self);
179         GeeIterator* (*iterator) (GeeAbstractCollection* self);
180         gboolean (*foreach) (GeeAbstractCollection* self, GeeForallFunc f, void* f_target);
181         void (*reserved0) (GeeAbstractCollection* self);
182         void (*reserved1) (GeeAbstractCollection* self);
183         void (*reserved2) (GeeAbstractCollection* self);
184         void (*reserved3) (GeeAbstractCollection* self);
185         void (*reserved4) (GeeAbstractCollection* self);
186         void (*reserved5) (GeeAbstractCollection* self);
187         void (*reserved6) (GeeAbstractCollection* self);
188         void (*reserved7) (GeeAbstractCollection* self);
189         void (*reserved8) (GeeAbstractCollection* self);
190         void (*reserved9) (GeeAbstractCollection* self);
191         gint (*get_size) (GeeAbstractCollection* self);
192         gboolean (*get_read_only) (GeeAbstractCollection* self);
193         GeeCollection* (*get_read_only_view) (GeeAbstractCollection* self);
194 };
195
196 struct _GeeQueueIface {
197         GTypeInterface parent_iface;
198         GType (*get_g_type) (GeeQueue* self);
199         GBoxedCopyFunc (*get_g_dup_func) (GeeQueue* self);
200         GDestroyNotify (*get_g_destroy_func) (GeeQueue* self);
201         gboolean (*offer) (GeeQueue* self, gconstpointer element);
202         gpointer (*peek) (GeeQueue* self);
203         gpointer (*poll) (GeeQueue* self);
204         gint (*drain) (GeeQueue* self, GeeCollection* recipient, gint amount);
205         gint (*get_capacity) (GeeQueue* self);
206         gint (*get_remaining_capacity) (GeeQueue* self);
207         gboolean (*get_is_full) (GeeQueue* self);
208 };
209
210 struct _GeeAbstractQueue {
211         GeeAbstractCollection parent_instance;
212         GeeAbstractQueuePrivate * priv;
213 };
214
215 struct _GeeAbstractQueueClass {
216         GeeAbstractCollectionClass parent_class;
217         gpointer (*peek) (GeeAbstractQueue* self);
218         gpointer (*poll) (GeeAbstractQueue* self);
219         void (*reserved0) (GeeAbstractQueue* self);
220         void (*reserved1) (GeeAbstractQueue* self);
221         void (*reserved2) (GeeAbstractQueue* self);
222         void (*reserved3) (GeeAbstractQueue* self);
223         void (*reserved4) (GeeAbstractQueue* self);
224         void (*reserved5) (GeeAbstractQueue* self);
225         void (*reserved6) (GeeAbstractQueue* self);
226         void (*reserved7) (GeeAbstractQueue* self);
227         void (*reserved8) (GeeAbstractQueue* self);
228         void (*reserved9) (GeeAbstractQueue* self);
229         gint (*get_capacity) (GeeAbstractQueue* self);
230         gint (*get_remaining_capacity) (GeeAbstractQueue* self);
231         gboolean (*get_is_full) (GeeAbstractQueue* self);
232 };
233
234 struct _GeeAbstractQueuePrivate {
235         GType g_type;
236         GBoxedCopyFunc g_dup_func;
237         GDestroyNotify g_destroy_func;
238 };
239
240
241 static gpointer gee_abstract_queue_parent_class = NULL;
242 static GeeQueueIface* gee_abstract_queue_gee_queue_parent_iface = NULL;
243
244 GType gee_traversable_stream_get_type (void) G_GNUC_CONST;
245 gpointer gee_lazy_ref (gpointer instance);
246 void gee_lazy_unref (gpointer instance);
247 GParamSpec* gee_param_spec_lazy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
248 void gee_value_set_lazy (GValue* value, gpointer v_object);
249 void gee_value_take_lazy (GValue* value, gpointer v_object);
250 gpointer gee_value_get_lazy (const GValue* value);
251 GType gee_lazy_get_type (void) G_GNUC_CONST;
252 GType gee_iterator_get_type (void) G_GNUC_CONST;
253 GType gee_traversable_get_type (void) G_GNUC_CONST;
254 GType gee_iterable_get_type (void) G_GNUC_CONST;
255 GType gee_collection_get_type (void) G_GNUC_CONST;
256 GType gee_abstract_collection_get_type (void) G_GNUC_CONST;
257 GType gee_queue_get_type (void) G_GNUC_CONST;
258 GType gee_abstract_queue_get_type (void) G_GNUC_CONST;
259 #define GEE_ABSTRACT_QUEUE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GEE_TYPE_ABSTRACT_QUEUE, GeeAbstractQueuePrivate))
260 enum  {
261         GEE_ABSTRACT_QUEUE_DUMMY_PROPERTY,
262         GEE_ABSTRACT_QUEUE_G_TYPE,
263         GEE_ABSTRACT_QUEUE_G_DUP_FUNC,
264         GEE_ABSTRACT_QUEUE_G_DESTROY_FUNC,
265         GEE_ABSTRACT_QUEUE_CAPACITY,
266         GEE_ABSTRACT_QUEUE_REMAINING_CAPACITY,
267         GEE_ABSTRACT_QUEUE_IS_FULL
268 };
269 gpointer gee_abstract_queue_peek (GeeAbstractQueue* self);
270 static gpointer gee_abstract_queue_real_peek (GeeAbstractQueue* self);
271 gpointer gee_abstract_queue_poll (GeeAbstractQueue* self);
272 static gpointer gee_abstract_queue_real_poll (GeeAbstractQueue* self);
273 void gee_abstract_queue_reserved0 (GeeAbstractQueue* self);
274 static void gee_abstract_queue_real_reserved0 (GeeAbstractQueue* self);
275 void gee_abstract_queue_reserved1 (GeeAbstractQueue* self);
276 static void gee_abstract_queue_real_reserved1 (GeeAbstractQueue* self);
277 void gee_abstract_queue_reserved2 (GeeAbstractQueue* self);
278 static void gee_abstract_queue_real_reserved2 (GeeAbstractQueue* self);
279 void gee_abstract_queue_reserved3 (GeeAbstractQueue* self);
280 static void gee_abstract_queue_real_reserved3 (GeeAbstractQueue* self);
281 void gee_abstract_queue_reserved4 (GeeAbstractQueue* self);
282 static void gee_abstract_queue_real_reserved4 (GeeAbstractQueue* self);
283 void gee_abstract_queue_reserved5 (GeeAbstractQueue* self);
284 static void gee_abstract_queue_real_reserved5 (GeeAbstractQueue* self);
285 void gee_abstract_queue_reserved6 (GeeAbstractQueue* self);
286 static void gee_abstract_queue_real_reserved6 (GeeAbstractQueue* self);
287 void gee_abstract_queue_reserved7 (GeeAbstractQueue* self);
288 static void gee_abstract_queue_real_reserved7 (GeeAbstractQueue* self);
289 void gee_abstract_queue_reserved8 (GeeAbstractQueue* self);
290 static void gee_abstract_queue_real_reserved8 (GeeAbstractQueue* self);
291 void gee_abstract_queue_reserved9 (GeeAbstractQueue* self);
292 static void gee_abstract_queue_real_reserved9 (GeeAbstractQueue* self);
293 GeeAbstractQueue* gee_abstract_queue_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
294 GeeAbstractCollection* gee_abstract_collection_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
295 gint gee_abstract_queue_get_capacity (GeeAbstractQueue* self);
296 gint gee_abstract_queue_get_remaining_capacity (GeeAbstractQueue* self);
297 gboolean gee_abstract_queue_get_is_full (GeeAbstractQueue* self);
298 static void _vala_gee_abstract_queue_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
299 static void _vala_gee_abstract_queue_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
300
301
302 /**
303  * {@inheritDoc}
304  */
305 static gpointer gee_abstract_queue_real_peek (GeeAbstractQueue* self) {
306         g_critical ("Type `%s' does not implement abstract method `gee_abstract_queue_peek'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
307         return NULL;
308 }
309
310
311 gpointer gee_abstract_queue_peek (GeeAbstractQueue* self) {
312         g_return_val_if_fail (self != NULL, NULL);
313         return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->peek (self);
314 }
315
316
317 /**
318  * {@inheritDoc}
319  */
320 static gpointer gee_abstract_queue_real_poll (GeeAbstractQueue* self) {
321         g_critical ("Type `%s' does not implement abstract method `gee_abstract_queue_poll'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
322         return NULL;
323 }
324
325
326 gpointer gee_abstract_queue_poll (GeeAbstractQueue* self) {
327         g_return_val_if_fail (self != NULL, NULL);
328         return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->poll (self);
329 }
330
331
332 static void gee_abstract_queue_real_reserved0 (GeeAbstractQueue* self) {
333 }
334
335
336 void gee_abstract_queue_reserved0 (GeeAbstractQueue* self) {
337         g_return_if_fail (self != NULL);
338         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved0 (self);
339 }
340
341
342 static void gee_abstract_queue_real_reserved1 (GeeAbstractQueue* self) {
343 }
344
345
346 void gee_abstract_queue_reserved1 (GeeAbstractQueue* self) {
347         g_return_if_fail (self != NULL);
348         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved1 (self);
349 }
350
351
352 static void gee_abstract_queue_real_reserved2 (GeeAbstractQueue* self) {
353 }
354
355
356 void gee_abstract_queue_reserved2 (GeeAbstractQueue* self) {
357         g_return_if_fail (self != NULL);
358         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved2 (self);
359 }
360
361
362 static void gee_abstract_queue_real_reserved3 (GeeAbstractQueue* self) {
363 }
364
365
366 void gee_abstract_queue_reserved3 (GeeAbstractQueue* self) {
367         g_return_if_fail (self != NULL);
368         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved3 (self);
369 }
370
371
372 static void gee_abstract_queue_real_reserved4 (GeeAbstractQueue* self) {
373 }
374
375
376 void gee_abstract_queue_reserved4 (GeeAbstractQueue* self) {
377         g_return_if_fail (self != NULL);
378         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved4 (self);
379 }
380
381
382 static void gee_abstract_queue_real_reserved5 (GeeAbstractQueue* self) {
383 }
384
385
386 void gee_abstract_queue_reserved5 (GeeAbstractQueue* self) {
387         g_return_if_fail (self != NULL);
388         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved5 (self);
389 }
390
391
392 static void gee_abstract_queue_real_reserved6 (GeeAbstractQueue* self) {
393 }
394
395
396 void gee_abstract_queue_reserved6 (GeeAbstractQueue* self) {
397         g_return_if_fail (self != NULL);
398         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved6 (self);
399 }
400
401
402 static void gee_abstract_queue_real_reserved7 (GeeAbstractQueue* self) {
403 }
404
405
406 void gee_abstract_queue_reserved7 (GeeAbstractQueue* self) {
407         g_return_if_fail (self != NULL);
408         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved7 (self);
409 }
410
411
412 static void gee_abstract_queue_real_reserved8 (GeeAbstractQueue* self) {
413 }
414
415
416 void gee_abstract_queue_reserved8 (GeeAbstractQueue* self) {
417         g_return_if_fail (self != NULL);
418         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved8 (self);
419 }
420
421
422 static void gee_abstract_queue_real_reserved9 (GeeAbstractQueue* self) {
423 }
424
425
426 void gee_abstract_queue_reserved9 (GeeAbstractQueue* self) {
427         g_return_if_fail (self != NULL);
428         GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved9 (self);
429 }
430
431
432 GeeAbstractQueue* gee_abstract_queue_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func) {
433         GeeAbstractQueue * self = NULL;
434         self = (GeeAbstractQueue*) gee_abstract_collection_construct (object_type, g_type, (GBoxedCopyFunc) g_dup_func, g_destroy_func);
435         self->priv->g_type = g_type;
436         self->priv->g_dup_func = g_dup_func;
437         self->priv->g_destroy_func = g_destroy_func;
438         return self;
439 }
440
441
442 gint gee_abstract_queue_get_capacity (GeeAbstractQueue* self) {
443         g_return_val_if_fail (self != NULL, 0);
444         return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->get_capacity (self);
445 }
446
447
448 gint gee_abstract_queue_get_remaining_capacity (GeeAbstractQueue* self) {
449         g_return_val_if_fail (self != NULL, 0);
450         return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->get_remaining_capacity (self);
451 }
452
453
454 gboolean gee_abstract_queue_get_is_full (GeeAbstractQueue* self) {
455         g_return_val_if_fail (self != NULL, FALSE);
456         return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->get_is_full (self);
457 }
458
459
460 static void gee_abstract_queue_class_init (GeeAbstractQueueClass * klass) {
461         gee_abstract_queue_parent_class = g_type_class_peek_parent (klass);
462         g_type_class_add_private (klass, sizeof (GeeAbstractQueuePrivate));
463         GEE_ABSTRACT_QUEUE_CLASS (klass)->peek = gee_abstract_queue_real_peek;
464         GEE_ABSTRACT_QUEUE_CLASS (klass)->poll = gee_abstract_queue_real_poll;
465         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved0 = gee_abstract_queue_real_reserved0;
466         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved1 = gee_abstract_queue_real_reserved1;
467         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved2 = gee_abstract_queue_real_reserved2;
468         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved3 = gee_abstract_queue_real_reserved3;
469         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved4 = gee_abstract_queue_real_reserved4;
470         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved5 = gee_abstract_queue_real_reserved5;
471         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved6 = gee_abstract_queue_real_reserved6;
472         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved7 = gee_abstract_queue_real_reserved7;
473         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved8 = gee_abstract_queue_real_reserved8;
474         GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved9 = gee_abstract_queue_real_reserved9;
475         G_OBJECT_CLASS (klass)->get_property = _vala_gee_abstract_queue_get_property;
476         G_OBJECT_CLASS (klass)->set_property = _vala_gee_abstract_queue_set_property;
477         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_QUEUE_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));
478         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_QUEUE_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));
479         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_QUEUE_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));
480         /**
481          * {@inheritDoc}
482          */
483         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_QUEUE_CAPACITY, g_param_spec_int ("capacity", "capacity", "capacity", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
484         /**
485          * {@inheritDoc}
486          */
487         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_QUEUE_REMAINING_CAPACITY, g_param_spec_int ("remaining-capacity", "remaining-capacity", "remaining-capacity", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
488         /**
489          * {@inheritDoc}
490          */
491         g_object_class_install_property (G_OBJECT_CLASS (klass), GEE_ABSTRACT_QUEUE_IS_FULL, g_param_spec_boolean ("is-full", "is-full", "is-full", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
492 }
493
494
495 static GType gee_abstract_queue_gee_queue_get_g_type (GeeAbstractQueue* self) {
496         return self->priv->g_type;
497 }
498
499
500 static GBoxedCopyFunc gee_abstract_queue_gee_queue_get_g_dup_func (GeeAbstractQueue* self) {
501         return self->priv->g_dup_func;
502 }
503
504
505 static GDestroyNotify gee_abstract_queue_gee_queue_get_g_destroy_func (GeeAbstractQueue* self) {
506         return self->priv->g_destroy_func;
507 }
508
509
510 static void gee_abstract_queue_gee_queue_interface_init (GeeQueueIface * iface) {
511         gee_abstract_queue_gee_queue_parent_iface = g_type_interface_peek_parent (iface);
512         iface->peek = (gpointer (*)(GeeQueue*)) gee_abstract_queue_peek;
513         iface->poll = (gpointer (*)(GeeQueue*)) gee_abstract_queue_poll;
514         iface->get_g_type = (GType(*)(GeeQueue*)) gee_abstract_queue_gee_queue_get_g_type;
515         iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeQueue*)) gee_abstract_queue_gee_queue_get_g_dup_func;
516         iface->get_g_destroy_func = (GDestroyNotify(*)(GeeQueue*)) gee_abstract_queue_gee_queue_get_g_destroy_func;
517         iface->get_capacity = (gint (*) (GeeQueue *)) gee_abstract_queue_get_capacity;
518         iface->get_remaining_capacity = (gint (*) (GeeQueue *)) gee_abstract_queue_get_remaining_capacity;
519         iface->get_is_full = (gboolean (*) (GeeQueue *)) gee_abstract_queue_get_is_full;
520 }
521
522
523 static void gee_abstract_queue_instance_init (GeeAbstractQueue * self) {
524         self->priv = GEE_ABSTRACT_QUEUE_GET_PRIVATE (self);
525 }
526
527
528 /**
529  * Skeletal implementation of the {@link Queue} interface.
530  *
531  * Contains common code shared by all queue implementations.
532  *
533  * @see PriorityQueue
534  */
535 GType gee_abstract_queue_get_type (void) {
536         static volatile gsize gee_abstract_queue_type_id__volatile = 0;
537         if (g_once_init_enter (&gee_abstract_queue_type_id__volatile)) {
538                 static const GTypeInfo g_define_type_info = { sizeof (GeeAbstractQueueClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gee_abstract_queue_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GeeAbstractQueue), 0, (GInstanceInitFunc) gee_abstract_queue_instance_init, NULL };
539                 static const GInterfaceInfo gee_queue_info = { (GInterfaceInitFunc) gee_abstract_queue_gee_queue_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
540                 GType gee_abstract_queue_type_id;
541                 gee_abstract_queue_type_id = g_type_register_static (GEE_TYPE_ABSTRACT_COLLECTION, "GeeAbstractQueue", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
542                 g_type_add_interface_static (gee_abstract_queue_type_id, GEE_TYPE_QUEUE, &gee_queue_info);
543                 g_once_init_leave (&gee_abstract_queue_type_id__volatile, gee_abstract_queue_type_id);
544         }
545         return gee_abstract_queue_type_id__volatile;
546 }
547
548
549 static void _vala_gee_abstract_queue_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
550         GeeAbstractQueue * self;
551         self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_ABSTRACT_QUEUE, GeeAbstractQueue);
552         switch (property_id) {
553                 default:
554                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
555                 break;
556         }
557 }
558
559
560 static void _vala_gee_abstract_queue_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
561         GeeAbstractQueue * self;
562         self = G_TYPE_CHECK_INSTANCE_CAST (object, GEE_TYPE_ABSTRACT_QUEUE, GeeAbstractQueue);
563         switch (property_id) {
564                 case GEE_ABSTRACT_QUEUE_G_TYPE:
565                 self->priv->g_type = g_value_get_gtype (value);
566                 break;
567                 case GEE_ABSTRACT_QUEUE_G_DUP_FUNC:
568                 self->priv->g_dup_func = g_value_get_pointer (value);
569                 break;
570                 case GEE_ABSTRACT_QUEUE_G_DESTROY_FUNC:
571                 self->priv->g_destroy_func = g_value_get_pointer (value);
572                 break;
573                 default:
574                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
575                 break;
576         }
577 }
578
579
580