summaryrefslogtreecommitdiff
path: root/gee/abstractqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'gee/abstractqueue.c')
-rw-r--r--gee/abstractqueue.c285
1 files changed, 237 insertions, 48 deletions
diff --git a/gee/abstractqueue.c b/gee/abstractqueue.c
index b43bec5..0b4da64 100644
--- a/gee/abstractqueue.c
+++ b/gee/abstractqueue.c
@@ -27,13 +27,25 @@
#include <glib-object.h>
-#define GEE_TYPE_ITERABLE (gee_iterable_get_type ())
-#define GEE_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERABLE, GeeIterable))
-#define GEE_IS_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ITERABLE))
-#define GEE_ITERABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_ITERABLE, GeeIterableIface))
+#define GEE_TYPE_TRAVERSABLE (gee_traversable_get_type ())
+#define GEE_TRAVERSABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TRAVERSABLE, GeeTraversable))
+#define GEE_IS_TRAVERSABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TRAVERSABLE))
+#define GEE_TRAVERSABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_TRAVERSABLE, GeeTraversableIface))
-typedef struct _GeeIterable GeeIterable;
-typedef struct _GeeIterableIface GeeIterableIface;
+typedef struct _GeeTraversable GeeTraversable;
+typedef struct _GeeTraversableIface GeeTraversableIface;
+
+#define GEE_TRAVERSABLE_TYPE_STREAM (gee_traversable_stream_get_type ())
+
+#define GEE_TYPE_LAZY (gee_lazy_get_type ())
+#define GEE_LAZY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_LAZY, GeeLazy))
+#define GEE_LAZY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_LAZY, GeeLazyClass))
+#define GEE_IS_LAZY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_LAZY))
+#define GEE_IS_LAZY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_LAZY))
+#define GEE_LAZY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_LAZY, GeeLazyClass))
+
+typedef struct _GeeLazy GeeLazy;
+typedef struct _GeeLazyClass GeeLazyClass;
#define GEE_TYPE_ITERATOR (gee_iterator_get_type ())
#define GEE_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERATOR, GeeIterator))
@@ -43,6 +55,14 @@ typedef struct _GeeIterableIface GeeIterableIface;
typedef struct _GeeIterator GeeIterator;
typedef struct _GeeIteratorIface GeeIteratorIface;
+#define GEE_TYPE_ITERABLE (gee_iterable_get_type ())
+#define GEE_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ITERABLE, GeeIterable))
+#define GEE_IS_ITERABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ITERABLE))
+#define GEE_ITERABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_ITERABLE, GeeIterableIface))
+
+typedef struct _GeeIterable GeeIterable;
+typedef struct _GeeIterableIface GeeIterableIface;
+
#define GEE_TYPE_COLLECTION (gee_collection_get_type ())
#define GEE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_COLLECTION, GeeCollection))
#define GEE_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_COLLECTION))
@@ -81,23 +101,55 @@ typedef struct _GeeAbstractQueue GeeAbstractQueue;
typedef struct _GeeAbstractQueueClass GeeAbstractQueueClass;
typedef struct _GeeAbstractQueuePrivate GeeAbstractQueuePrivate;
+typedef gboolean (*GeeForallFunc) (gpointer g, void* user_data);
+typedef enum {
+ GEE_TRAVERSABLE_STREAM_YIELD,
+ GEE_TRAVERSABLE_STREAM_CONTINUE,
+ GEE_TRAVERSABLE_STREAM_END
+} GeeTraversableStream;
+
+typedef GeeTraversableStream (*GeeStreamFunc) (GeeTraversableStream state, GeeLazy* g, GeeLazy** lazy, void* user_data);
struct _GeeIteratorIface {
GTypeInterface parent_iface;
gboolean (*next) (GeeIterator* self);
gboolean (*has_next) (GeeIterator* self);
- gboolean (*first) (GeeIterator* self);
gpointer (*get) (GeeIterator* self);
void (*remove) (GeeIterator* self);
+ gboolean (*get_valid) (GeeIterator* self);
+ gboolean (*get_read_only) (GeeIterator* self);
+};
+
+typedef gpointer (*GeeFoldFunc) (gpointer g, gpointer a, void* user_data);
+typedef gpointer (*GeeMapFunc) (gpointer g, void* user_data);
+typedef gboolean (*GeePredicate) (gconstpointer g, void* user_data);
+struct _GeeTraversableIface {
+ GTypeInterface parent_iface;
+ GType (*get_g_type) (GeeTraversable* self);
+ GBoxedCopyFunc (*get_g_dup_func) (GeeTraversable* self);
+ GDestroyNotify (*get_g_destroy_func) (GeeTraversable* self);
+ gboolean (*foreach) (GeeTraversable* self, GeeForallFunc f, void* f_target);
+ 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);
+ gpointer (*fold) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
+ GeeIterator* (*map) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeMapFunc f, void* f_target);
+ GeeIterator* (*scan) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
+ GeeIterator* (*filter) (GeeTraversable* self, GeePredicate pred, void* pred_target, GDestroyNotify pred_target_destroy_notify);
+ GeeIterator* (*chop) (GeeTraversable* self, gint offset, gint length);
+ GType (*get_element_type) (GeeTraversable* self);
};
struct _GeeIterableIface {
GTypeInterface parent_iface;
+ GType (*get_g_type) (GeeIterable* self);
+ GBoxedCopyFunc (*get_g_dup_func) (GeeIterable* self);
+ GDestroyNotify (*get_g_destroy_func) (GeeIterable* self);
GeeIterator* (*iterator) (GeeIterable* self);
- GType (*get_element_type) (GeeIterable* self);
};
struct _GeeCollectionIface {
GTypeInterface parent_iface;
+ GType (*get_g_type) (GeeCollection* self);
+ GBoxedCopyFunc (*get_g_dup_func) (GeeCollection* self);
+ GDestroyNotify (*get_g_destroy_func) (GeeCollection* self);
gboolean (*contains) (GeeCollection* self, gconstpointer item);
gboolean (*add) (GeeCollection* self, gconstpointer item);
gboolean (*remove) (GeeCollection* self, gconstpointer item);
@@ -109,6 +161,7 @@ struct _GeeCollectionIface {
gpointer* (*to_array) (GeeCollection* self, int* result_length1);
gint (*get_size) (GeeCollection* self);
gboolean (*get_is_empty) (GeeCollection* self);
+ gboolean (*get_read_only) (GeeCollection* self);
GeeCollection* (*get_read_only_view) (GeeCollection* self);
};
@@ -123,19 +176,28 @@ struct _GeeAbstractCollectionClass {
gboolean (*add) (GeeAbstractCollection* self, gconstpointer item);
gboolean (*remove) (GeeAbstractCollection* self, gconstpointer item);
void (*clear) (GeeAbstractCollection* self);
- gpointer* (*to_array) (GeeAbstractCollection* self, int* result_length1);
- gboolean (*add_all) (GeeAbstractCollection* self, GeeCollection* collection);
- gboolean (*contains_all) (GeeAbstractCollection* self, GeeCollection* collection);
- gboolean (*remove_all) (GeeAbstractCollection* self, GeeCollection* collection);
- gboolean (*retain_all) (GeeAbstractCollection* self, GeeCollection* collection);
GeeIterator* (*iterator) (GeeAbstractCollection* self);
+ gboolean (*foreach) (GeeAbstractCollection* self, GeeForallFunc f, void* f_target);
+ void (*reserved0) (GeeAbstractCollection* self);
+ void (*reserved1) (GeeAbstractCollection* self);
+ void (*reserved2) (GeeAbstractCollection* self);
+ void (*reserved3) (GeeAbstractCollection* self);
+ void (*reserved4) (GeeAbstractCollection* self);
+ void (*reserved5) (GeeAbstractCollection* self);
+ void (*reserved6) (GeeAbstractCollection* self);
+ void (*reserved7) (GeeAbstractCollection* self);
+ void (*reserved8) (GeeAbstractCollection* self);
+ void (*reserved9) (GeeAbstractCollection* self);
gint (*get_size) (GeeAbstractCollection* self);
- gboolean (*get_is_empty) (GeeAbstractCollection* self);
+ gboolean (*get_read_only) (GeeAbstractCollection* self);
GeeCollection* (*get_read_only_view) (GeeAbstractCollection* self);
};
struct _GeeQueueIface {
GTypeInterface parent_iface;
+ GType (*get_g_type) (GeeQueue* self);
+ GBoxedCopyFunc (*get_g_dup_func) (GeeQueue* self);
+ GDestroyNotify (*get_g_destroy_func) (GeeQueue* self);
gboolean (*offer) (GeeQueue* self, gconstpointer element);
gpointer (*peek) (GeeQueue* self);
gpointer (*poll) (GeeQueue* self);
@@ -152,10 +214,18 @@ struct _GeeAbstractQueue {
struct _GeeAbstractQueueClass {
GeeAbstractCollectionClass parent_class;
- gboolean (*offer) (GeeAbstractQueue* self, gconstpointer element);
gpointer (*peek) (GeeAbstractQueue* self);
gpointer (*poll) (GeeAbstractQueue* self);
- gint (*drain) (GeeAbstractQueue* self, GeeCollection* recipient, gint amount);
+ void (*reserved0) (GeeAbstractQueue* self);
+ void (*reserved1) (GeeAbstractQueue* self);
+ void (*reserved2) (GeeAbstractQueue* self);
+ void (*reserved3) (GeeAbstractQueue* self);
+ void (*reserved4) (GeeAbstractQueue* self);
+ void (*reserved5) (GeeAbstractQueue* self);
+ void (*reserved6) (GeeAbstractQueue* self);
+ void (*reserved7) (GeeAbstractQueue* self);
+ void (*reserved8) (GeeAbstractQueue* self);
+ void (*reserved9) (GeeAbstractQueue* self);
gint (*get_capacity) (GeeAbstractQueue* self);
gint (*get_remaining_capacity) (GeeAbstractQueue* self);
gboolean (*get_is_full) (GeeAbstractQueue* self);
@@ -171,7 +241,16 @@ struct _GeeAbstractQueuePrivate {
static gpointer gee_abstract_queue_parent_class = NULL;
static GeeQueueIface* gee_abstract_queue_gee_queue_parent_iface = NULL;
+GType gee_traversable_stream_get_type (void) G_GNUC_CONST;
+gpointer gee_lazy_ref (gpointer instance);
+void gee_lazy_unref (gpointer instance);
+GParamSpec* gee_param_spec_lazy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void gee_value_set_lazy (GValue* value, gpointer v_object);
+void gee_value_take_lazy (GValue* value, gpointer v_object);
+gpointer gee_value_get_lazy (const GValue* value);
+GType gee_lazy_get_type (void) G_GNUC_CONST;
GType gee_iterator_get_type (void) G_GNUC_CONST;
+GType gee_traversable_get_type (void) G_GNUC_CONST;
GType gee_iterable_get_type (void) G_GNUC_CONST;
GType gee_collection_get_type (void) G_GNUC_CONST;
GType gee_abstract_collection_get_type (void) G_GNUC_CONST;
@@ -187,14 +266,30 @@ enum {
GEE_ABSTRACT_QUEUE_REMAINING_CAPACITY,
GEE_ABSTRACT_QUEUE_IS_FULL
};
-gboolean gee_abstract_queue_offer (GeeAbstractQueue* self, gconstpointer element);
-static gboolean gee_abstract_queue_real_offer (GeeAbstractQueue* self, gconstpointer element);
gpointer gee_abstract_queue_peek (GeeAbstractQueue* self);
static gpointer gee_abstract_queue_real_peek (GeeAbstractQueue* self);
gpointer gee_abstract_queue_poll (GeeAbstractQueue* self);
static gpointer gee_abstract_queue_real_poll (GeeAbstractQueue* self);
-gint gee_abstract_queue_drain (GeeAbstractQueue* self, GeeCollection* recipient, gint amount);
-static gint gee_abstract_queue_real_drain (GeeAbstractQueue* self, GeeCollection* recipient, gint amount);
+void gee_abstract_queue_reserved0 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved0 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved1 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved1 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved2 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved2 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved3 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved3 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved4 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved4 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved5 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved5 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved6 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved6 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved7 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved7 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved8 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved8 (GeeAbstractQueue* self);
+void gee_abstract_queue_reserved9 (GeeAbstractQueue* self);
+static void gee_abstract_queue_real_reserved9 (GeeAbstractQueue* self);
GeeAbstractQueue* gee_abstract_queue_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
GeeAbstractCollection* gee_abstract_collection_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
gint gee_abstract_queue_get_capacity (GeeAbstractQueue* self);
@@ -207,21 +302,6 @@ static void _vala_gee_abstract_queue_set_property (GObject * object, guint prope
/**
* {@inheritDoc}
*/
-static gboolean gee_abstract_queue_real_offer (GeeAbstractQueue* self, gconstpointer element) {
- g_critical ("Type `%s' does not implement abstract method `gee_abstract_queue_offer'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
- return FALSE;
-}
-
-
-gboolean gee_abstract_queue_offer (GeeAbstractQueue* self, gconstpointer element) {
- g_return_val_if_fail (self != NULL, FALSE);
- return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->offer (self, element);
-}
-
-
-/**
- * {@inheritDoc}
- */
static gpointer gee_abstract_queue_real_peek (GeeAbstractQueue* self) {
g_critical ("Type `%s' does not implement abstract method `gee_abstract_queue_peek'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
return NULL;
@@ -249,18 +329,103 @@ gpointer gee_abstract_queue_poll (GeeAbstractQueue* self) {
}
-/**
- * {@inheritDoc}
- */
-static gint gee_abstract_queue_real_drain (GeeAbstractQueue* self, GeeCollection* recipient, gint amount) {
- g_critical ("Type `%s' does not implement abstract method `gee_abstract_queue_drain'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
- return 0;
+static void gee_abstract_queue_real_reserved0 (GeeAbstractQueue* self) {
}
-gint gee_abstract_queue_drain (GeeAbstractQueue* self, GeeCollection* recipient, gint amount) {
- g_return_val_if_fail (self != NULL, 0);
- return GEE_ABSTRACT_QUEUE_GET_CLASS (self)->drain (self, recipient, amount);
+void gee_abstract_queue_reserved0 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved0 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved1 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved1 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved1 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved2 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved2 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved2 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved3 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved3 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved3 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved4 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved4 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved4 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved5 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved5 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved5 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved6 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved6 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved6 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved7 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved7 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved7 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved8 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved8 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved8 (self);
+}
+
+
+static void gee_abstract_queue_real_reserved9 (GeeAbstractQueue* self) {
+}
+
+
+void gee_abstract_queue_reserved9 (GeeAbstractQueue* self) {
+ g_return_if_fail (self != NULL);
+ GEE_ABSTRACT_QUEUE_GET_CLASS (self)->reserved9 (self);
}
@@ -295,10 +460,18 @@ gboolean gee_abstract_queue_get_is_full (GeeAbstractQueue* self) {
static void gee_abstract_queue_class_init (GeeAbstractQueueClass * klass) {
gee_abstract_queue_parent_class = g_type_class_peek_parent (klass);
g_type_class_add_private (klass, sizeof (GeeAbstractQueuePrivate));
- GEE_ABSTRACT_QUEUE_CLASS (klass)->offer = gee_abstract_queue_real_offer;
GEE_ABSTRACT_QUEUE_CLASS (klass)->peek = gee_abstract_queue_real_peek;
GEE_ABSTRACT_QUEUE_CLASS (klass)->poll = gee_abstract_queue_real_poll;
- GEE_ABSTRACT_QUEUE_CLASS (klass)->drain = gee_abstract_queue_real_drain;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved0 = gee_abstract_queue_real_reserved0;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved1 = gee_abstract_queue_real_reserved1;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved2 = gee_abstract_queue_real_reserved2;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved3 = gee_abstract_queue_real_reserved3;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved4 = gee_abstract_queue_real_reserved4;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved5 = gee_abstract_queue_real_reserved5;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved6 = gee_abstract_queue_real_reserved6;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved7 = gee_abstract_queue_real_reserved7;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved8 = gee_abstract_queue_real_reserved8;
+ GEE_ABSTRACT_QUEUE_CLASS (klass)->reserved9 = gee_abstract_queue_real_reserved9;
G_OBJECT_CLASS (klass)->get_property = _vala_gee_abstract_queue_get_property;
G_OBJECT_CLASS (klass)->set_property = _vala_gee_abstract_queue_set_property;
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));
@@ -319,12 +492,28 @@ static void gee_abstract_queue_class_init (GeeAbstractQueueClass * klass) {
}
+static GType gee_abstract_queue_gee_queue_get_g_type (GeeAbstractQueue* self) {
+ return self->priv->g_type;
+}
+
+
+static GBoxedCopyFunc gee_abstract_queue_gee_queue_get_g_dup_func (GeeAbstractQueue* self) {
+ return self->priv->g_dup_func;
+}
+
+
+static GDestroyNotify gee_abstract_queue_gee_queue_get_g_destroy_func (GeeAbstractQueue* self) {
+ return self->priv->g_destroy_func;
+}
+
+
static void gee_abstract_queue_gee_queue_interface_init (GeeQueueIface * iface) {
gee_abstract_queue_gee_queue_parent_iface = g_type_interface_peek_parent (iface);
- iface->offer = (gboolean (*)(GeeQueue*, gconstpointer)) gee_abstract_queue_offer;
iface->peek = (gpointer (*)(GeeQueue*)) gee_abstract_queue_peek;
iface->poll = (gpointer (*)(GeeQueue*)) gee_abstract_queue_poll;
- iface->drain = (gint (*)(GeeQueue*, GeeCollection*, gint)) gee_abstract_queue_drain;
+ iface->get_g_type = (GType(*)(GeeQueue*)) gee_abstract_queue_gee_queue_get_g_type;
+ iface->get_g_dup_func = (GBoxedCopyFunc(*)(GeeQueue*)) gee_abstract_queue_gee_queue_get_g_dup_func;
+ iface->get_g_destroy_func = (GDestroyNotify(*)(GeeQueue*)) gee_abstract_queue_gee_queue_get_g_destroy_func;
iface->get_capacity = (gint (*) (GeeQueue *)) gee_abstract_queue_get_capacity;
iface->get_remaining_capacity = (gint (*) (GeeQueue *)) gee_abstract_queue_get_remaining_capacity;
iface->get_is_full = (gboolean (*) (GeeQueue *)) gee_abstract_queue_get_is_full;