Update Changelog
[profile/ivi/libgee.git] / gee / sortedset.c
1 /* sortedset.c generated by valac 0.18.0, the Vala compiler
2  * generated from sortedset.vala, do not modify */
3
4 /* sortedset.vala
5  *
6  * Copyright (C) 2009  Didier Villevalois, Maciej Piechotka
7  * Copyright (C) 2011  Maciej Piechotka
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  *      Maciej Piechotka <uzytkownik2@gmail.com>
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_SET (gee_set_get_type ())
76 #define GEE_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SET, GeeSet))
77 #define GEE_IS_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SET))
78 #define GEE_SET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_SET, GeeSetIface))
79
80 typedef struct _GeeSet GeeSet;
81 typedef struct _GeeSetIface GeeSetIface;
82
83 #define GEE_TYPE_SORTED_SET (gee_sorted_set_get_type ())
84 #define GEE_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_SORTED_SET, GeeSortedSet))
85 #define GEE_IS_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_SORTED_SET))
86 #define GEE_SORTED_SET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_SORTED_SET, GeeSortedSetIface))
87
88 typedef struct _GeeSortedSet GeeSortedSet;
89 typedef struct _GeeSortedSetIface GeeSortedSetIface;
90
91 #define GEE_TYPE_ABSTRACT_COLLECTION (gee_abstract_collection_get_type ())
92 #define GEE_ABSTRACT_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection))
93 #define GEE_ABSTRACT_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollectionClass))
94 #define GEE_IS_ABSTRACT_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_COLLECTION))
95 #define GEE_IS_ABSTRACT_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_COLLECTION))
96 #define GEE_ABSTRACT_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollectionClass))
97
98 typedef struct _GeeAbstractCollection GeeAbstractCollection;
99 typedef struct _GeeAbstractCollectionClass GeeAbstractCollectionClass;
100
101 #define GEE_TYPE_ABSTRACT_SET (gee_abstract_set_get_type ())
102 #define GEE_ABSTRACT_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_SET, GeeAbstractSet))
103 #define GEE_ABSTRACT_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_SET, GeeAbstractSetClass))
104 #define GEE_IS_ABSTRACT_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_SET))
105 #define GEE_IS_ABSTRACT_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_SET))
106 #define GEE_ABSTRACT_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_SET, GeeAbstractSetClass))
107
108 typedef struct _GeeAbstractSet GeeAbstractSet;
109 typedef struct _GeeAbstractSetClass GeeAbstractSetClass;
110
111 #define GEE_TYPE_ABSTRACT_SORTED_SET (gee_abstract_sorted_set_get_type ())
112 #define GEE_ABSTRACT_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_SORTED_SET, GeeAbstractSortedSet))
113 #define GEE_ABSTRACT_SORTED_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_SORTED_SET, GeeAbstractSortedSetClass))
114 #define GEE_IS_ABSTRACT_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_SORTED_SET))
115 #define GEE_IS_ABSTRACT_SORTED_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_SORTED_SET))
116 #define GEE_ABSTRACT_SORTED_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_SORTED_SET, GeeAbstractSortedSetClass))
117
118 typedef struct _GeeAbstractSortedSet GeeAbstractSortedSet;
119 typedef struct _GeeAbstractSortedSetClass GeeAbstractSortedSetClass;
120
121 #define GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET (gee_abstract_bidir_sorted_set_get_type ())
122 #define GEE_ABSTRACT_BIDIR_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, GeeAbstractBidirSortedSet))
123 #define GEE_ABSTRACT_BIDIR_SORTED_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, GeeAbstractBidirSortedSetClass))
124 #define GEE_IS_ABSTRACT_BIDIR_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET))
125 #define GEE_IS_ABSTRACT_BIDIR_SORTED_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET))
126 #define GEE_ABSTRACT_BIDIR_SORTED_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_ABSTRACT_BIDIR_SORTED_SET, GeeAbstractBidirSortedSetClass))
127
128 typedef struct _GeeAbstractBidirSortedSet GeeAbstractBidirSortedSet;
129 typedef struct _GeeAbstractBidirSortedSetClass GeeAbstractBidirSortedSetClass;
130
131 #define GEE_TYPE_TREE_SET (gee_tree_set_get_type ())
132 #define GEE_TREE_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_TREE_SET, GeeTreeSet))
133 #define GEE_TREE_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEE_TYPE_TREE_SET, GeeTreeSetClass))
134 #define GEE_IS_TREE_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_TREE_SET))
135 #define GEE_IS_TREE_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEE_TYPE_TREE_SET))
136 #define GEE_TREE_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEE_TYPE_TREE_SET, GeeTreeSetClass))
137
138 typedef struct _GeeTreeSet GeeTreeSet;
139 typedef struct _GeeTreeSetClass GeeTreeSetClass;
140
141 #define GEE_TYPE_BIDIR_SORTED_SET (gee_bidir_sorted_set_get_type ())
142 #define GEE_BIDIR_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_BIDIR_SORTED_SET, GeeBidirSortedSet))
143 #define GEE_IS_BIDIR_SORTED_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_BIDIR_SORTED_SET))
144 #define GEE_BIDIR_SORTED_SET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_BIDIR_SORTED_SET, GeeBidirSortedSetIface))
145
146 typedef struct _GeeBidirSortedSet GeeBidirSortedSet;
147 typedef struct _GeeBidirSortedSetIface GeeBidirSortedSetIface;
148
149 #define GEE_TYPE_BIDIR_ITERATOR (gee_bidir_iterator_get_type ())
150 #define GEE_BIDIR_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEE_TYPE_BIDIR_ITERATOR, GeeBidirIterator))
151 #define GEE_IS_BIDIR_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEE_TYPE_BIDIR_ITERATOR))
152 #define GEE_BIDIR_ITERATOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GEE_TYPE_BIDIR_ITERATOR, GeeBidirIteratorIface))
153
154 typedef struct _GeeBidirIterator GeeBidirIterator;
155 typedef struct _GeeBidirIteratorIface GeeBidirIteratorIface;
156 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
157
158 typedef gboolean (*GeeForallFunc) (gpointer g, void* user_data);
159 typedef enum  {
160         GEE_TRAVERSABLE_STREAM_YIELD,
161         GEE_TRAVERSABLE_STREAM_CONTINUE,
162         GEE_TRAVERSABLE_STREAM_END
163 } GeeTraversableStream;
164
165 typedef GeeTraversableStream (*GeeStreamFunc) (GeeTraversableStream state, GeeLazy* g, GeeLazy** lazy, void* user_data);
166 struct _GeeIteratorIface {
167         GTypeInterface parent_iface;
168         gboolean (*next) (GeeIterator* self);
169         gboolean (*has_next) (GeeIterator* self);
170         gpointer (*get) (GeeIterator* self);
171         void (*remove) (GeeIterator* self);
172         gboolean (*get_valid) (GeeIterator* self);
173         gboolean (*get_read_only) (GeeIterator* self);
174 };
175
176 typedef gpointer (*GeeFoldFunc) (gpointer g, gpointer a, void* user_data);
177 typedef gpointer (*GeeMapFunc) (gpointer g, void* user_data);
178 typedef gboolean (*GeePredicate) (gconstpointer g, void* user_data);
179 struct _GeeTraversableIface {
180         GTypeInterface parent_iface;
181         GType (*get_g_type) (GeeTraversable* self);
182         GBoxedCopyFunc (*get_g_dup_func) (GeeTraversable* self);
183         GDestroyNotify (*get_g_destroy_func) (GeeTraversable* self);
184         gboolean (*foreach) (GeeTraversable* self, GeeForallFunc f, void* f_target);
185         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);
186         gpointer (*fold) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
187         GeeIterator* (*map) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeMapFunc f, void* f_target);
188         GeeIterator* (*scan) (GeeTraversable* self, GType a_type, GBoxedCopyFunc a_dup_func, GDestroyNotify a_destroy_func, GeeFoldFunc f, void* f_target, gpointer seed);
189         GeeIterator* (*filter) (GeeTraversable* self, GeePredicate pred, void* pred_target, GDestroyNotify pred_target_destroy_notify);
190         GeeIterator* (*chop) (GeeTraversable* self, gint offset, gint length);
191         GType (*get_element_type) (GeeTraversable* self);
192 };
193
194 struct _GeeIterableIface {
195         GTypeInterface parent_iface;
196         GType (*get_g_type) (GeeIterable* self);
197         GBoxedCopyFunc (*get_g_dup_func) (GeeIterable* self);
198         GDestroyNotify (*get_g_destroy_func) (GeeIterable* self);
199         GeeIterator* (*iterator) (GeeIterable* self);
200 };
201
202 struct _GeeCollectionIface {
203         GTypeInterface parent_iface;
204         GType (*get_g_type) (GeeCollection* self);
205         GBoxedCopyFunc (*get_g_dup_func) (GeeCollection* self);
206         GDestroyNotify (*get_g_destroy_func) (GeeCollection* self);
207         gboolean (*contains) (GeeCollection* self, gconstpointer item);
208         gboolean (*add) (GeeCollection* self, gconstpointer item);
209         gboolean (*remove) (GeeCollection* self, gconstpointer item);
210         void (*clear) (GeeCollection* self);
211         gboolean (*add_all) (GeeCollection* self, GeeCollection* collection);
212         gboolean (*contains_all) (GeeCollection* self, GeeCollection* collection);
213         gboolean (*remove_all) (GeeCollection* self, GeeCollection* collection);
214         gboolean (*retain_all) (GeeCollection* self, GeeCollection* collection);
215         gpointer* (*to_array) (GeeCollection* self, int* result_length1);
216         gint (*get_size) (GeeCollection* self);
217         gboolean (*get_is_empty) (GeeCollection* self);
218         gboolean (*get_read_only) (GeeCollection* self);
219         GeeCollection* (*get_read_only_view) (GeeCollection* self);
220 };
221
222 struct _GeeSetIface {
223         GTypeInterface parent_iface;
224         GType (*get_g_type) (GeeSet* self);
225         GBoxedCopyFunc (*get_g_dup_func) (GeeSet* self);
226         GDestroyNotify (*get_g_destroy_func) (GeeSet* self);
227         GeeSet* (*get_read_only_view) (GeeSet* self);
228 };
229
230 struct _GeeSortedSetIface {
231         GTypeInterface parent_iface;
232         GType (*get_g_type) (GeeSortedSet* self);
233         GBoxedCopyFunc (*get_g_dup_func) (GeeSortedSet* self);
234         GDestroyNotify (*get_g_destroy_func) (GeeSortedSet* self);
235         gpointer (*first) (GeeSortedSet* self);
236         gpointer (*last) (GeeSortedSet* self);
237         GeeIterator* (*iterator_at) (GeeSortedSet* self, gconstpointer element);
238         gpointer (*lower) (GeeSortedSet* self, gconstpointer element);
239         gpointer (*higher) (GeeSortedSet* self, gconstpointer element);
240         gpointer (*floor) (GeeSortedSet* self, gconstpointer element);
241         gpointer (*ceil) (GeeSortedSet* self, gconstpointer element);
242         GeeSortedSet* (*head_set) (GeeSortedSet* self, gconstpointer before);
243         GeeSortedSet* (*tail_set) (GeeSortedSet* self, gconstpointer after);
244         GeeSortedSet* (*sub_set) (GeeSortedSet* self, gconstpointer from, gconstpointer to);
245         GeeSortedSet* (*get_read_only_view) (GeeSortedSet* self);
246 };
247
248 struct _GeeBidirIteratorIface {
249         GTypeInterface parent_iface;
250         GType (*get_g_type) (GeeBidirIterator* self);
251         GBoxedCopyFunc (*get_g_dup_func) (GeeBidirIterator* self);
252         GDestroyNotify (*get_g_destroy_func) (GeeBidirIterator* self);
253         gboolean (*previous) (GeeBidirIterator* self);
254         gboolean (*has_previous) (GeeBidirIterator* self);
255         gboolean (*first) (GeeBidirIterator* self);
256         gboolean (*last) (GeeBidirIterator* self);
257 };
258
259 struct _GeeBidirSortedSetIface {
260         GTypeInterface parent_iface;
261         GType (*get_g_type) (GeeBidirSortedSet* self);
262         GBoxedCopyFunc (*get_g_dup_func) (GeeBidirSortedSet* self);
263         GDestroyNotify (*get_g_destroy_func) (GeeBidirSortedSet* self);
264         GeeBidirIterator* (*bidir_iterator) (GeeBidirSortedSet* self);
265         GeeBidirSortedSet* (*get_read_only_view) (GeeBidirSortedSet* self);
266 };
267
268
269
270 GType gee_traversable_stream_get_type (void) G_GNUC_CONST;
271 gpointer gee_lazy_ref (gpointer instance);
272 void gee_lazy_unref (gpointer instance);
273 GParamSpec* gee_param_spec_lazy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
274 void gee_value_set_lazy (GValue* value, gpointer v_object);
275 void gee_value_take_lazy (GValue* value, gpointer v_object);
276 gpointer gee_value_get_lazy (const GValue* value);
277 GType gee_lazy_get_type (void) G_GNUC_CONST;
278 GType gee_iterator_get_type (void) G_GNUC_CONST;
279 GType gee_traversable_get_type (void) G_GNUC_CONST;
280 GType gee_iterable_get_type (void) G_GNUC_CONST;
281 GType gee_collection_get_type (void) G_GNUC_CONST;
282 GType gee_set_get_type (void) G_GNUC_CONST;
283 GType gee_sorted_set_get_type (void) G_GNUC_CONST;
284 gpointer gee_sorted_set_first (GeeSortedSet* self);
285 gpointer gee_sorted_set_last (GeeSortedSet* self);
286 GeeIterator* gee_sorted_set_iterator_at (GeeSortedSet* self, gconstpointer element);
287 gpointer gee_sorted_set_lower (GeeSortedSet* self, gconstpointer element);
288 gpointer gee_sorted_set_higher (GeeSortedSet* self, gconstpointer element);
289 gpointer gee_sorted_set_floor (GeeSortedSet* self, gconstpointer element);
290 gpointer gee_sorted_set_ceil (GeeSortedSet* self, gconstpointer element);
291 GeeSortedSet* gee_sorted_set_head_set (GeeSortedSet* self, gconstpointer before);
292 GeeSortedSet* gee_sorted_set_tail_set (GeeSortedSet* self, gconstpointer after);
293 GeeSortedSet* gee_sorted_set_sub_set (GeeSortedSet* self, gconstpointer from, gconstpointer to);
294 GeeSortedSet* gee_sorted_set_empty (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func);
295 GeeTreeSet* gee_tree_set_new (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify);
296 GeeTreeSet* gee_tree_set_construct (GType object_type, GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func, GCompareDataFunc compare_func, void* compare_func_target, GDestroyNotify compare_func_target_destroy_notify);
297 GType gee_abstract_collection_get_type (void) G_GNUC_CONST;
298 GType gee_abstract_set_get_type (void) G_GNUC_CONST;
299 GType gee_abstract_sorted_set_get_type (void) G_GNUC_CONST;
300 GType gee_abstract_bidir_sorted_set_get_type (void) G_GNUC_CONST;
301 GType gee_tree_set_get_type (void) G_GNUC_CONST;
302 GType gee_bidir_iterator_get_type (void) G_GNUC_CONST;
303 GType gee_bidir_sorted_set_get_type (void) G_GNUC_CONST;
304 GeeBidirSortedSet* gee_abstract_bidir_sorted_set_get_read_only_view (GeeAbstractBidirSortedSet* self);
305 GeeSortedSet* gee_sorted_set_get_read_only_view (GeeSortedSet* self);
306
307
308 /**
309  * Returns the first element of the sorted set. Set must not be empty.
310  *
311  * @return the first element in the sorted set
312  */
313 gpointer gee_sorted_set_first (GeeSortedSet* self) {
314         g_return_val_if_fail (self != NULL, NULL);
315         return GEE_SORTED_SET_GET_INTERFACE (self)->first (self);
316 }
317
318
319 /**
320  * Returns the last element of the sorted set. Set must not be empty.
321  *
322  * @return the last element in the sorted set
323  */
324 gpointer gee_sorted_set_last (GeeSortedSet* self) {
325         g_return_val_if_fail (self != NULL, NULL);
326         return GEE_SORTED_SET_GET_INTERFACE (self)->last (self);
327 }
328
329
330 /**
331  * Returns a {@link BidirIterator} initialy pointed at the specified
332  * element.
333  *
334  * @param element the element to point the iterator at
335  *
336  * @return        a {@link BidirIterator} over this sorted set, or null if
337  *                the specified element is not in this set
338  */
339 GeeIterator* gee_sorted_set_iterator_at (GeeSortedSet* self, gconstpointer element) {
340         g_return_val_if_fail (self != NULL, NULL);
341         return GEE_SORTED_SET_GET_INTERFACE (self)->iterator_at (self, element);
342 }
343
344
345 /**
346  * Returns the element which is strictly lower than the specified element.
347  *
348  * @param element the element which you want the lower element for
349  *
350  * @return        the corresponding element
351  */
352 gpointer gee_sorted_set_lower (GeeSortedSet* self, gconstpointer element) {
353         g_return_val_if_fail (self != NULL, NULL);
354         return GEE_SORTED_SET_GET_INTERFACE (self)->lower (self, element);
355 }
356
357
358 /**
359  * Returns the element which is strictly higher than the specified element.
360  *
361  * @param element the element which you want the strictly higher element
362  *                for
363  *
364  * @return        the corresponding element
365  */
366 gpointer gee_sorted_set_higher (GeeSortedSet* self, gconstpointer element) {
367         g_return_val_if_fail (self != NULL, NULL);
368         return GEE_SORTED_SET_GET_INTERFACE (self)->higher (self, element);
369 }
370
371
372 /**
373  * Returns the element which is lower or equal then the specified element.
374  *
375  * @param element the element which you want the lower or equal element for
376  *
377  * @return        the corresponding element
378  */
379 gpointer gee_sorted_set_floor (GeeSortedSet* self, gconstpointer element) {
380         g_return_val_if_fail (self != NULL, NULL);
381         return GEE_SORTED_SET_GET_INTERFACE (self)->floor (self, element);
382 }
383
384
385 /**
386  * Returns the element which is higher or equal then the specified element.
387  *
388  * @param element the element which you want the higher or equal element
389  *                for
390  *
391  * @return        the corresponding element
392  */
393 gpointer gee_sorted_set_ceil (GeeSortedSet* self, gconstpointer element) {
394         g_return_val_if_fail (self != NULL, NULL);
395         return GEE_SORTED_SET_GET_INTERFACE (self)->ceil (self, element);
396 }
397
398
399 /**
400  * Returns the sub-set of this sorted set containing elements strictly
401  * lower than the specified element.
402  *
403  * @param before the lower inclusive bound for the sub-set
404  *
405  * @return     the corresponding sub-set of this sorted set
406  */
407 GeeSortedSet* gee_sorted_set_head_set (GeeSortedSet* self, gconstpointer before) {
408         g_return_val_if_fail (self != NULL, NULL);
409         return GEE_SORTED_SET_GET_INTERFACE (self)->head_set (self, before);
410 }
411
412
413 /**
414  * Returns the sub-set of this sorted set containing elements equal or
415  * higher than the specified element.
416  *
417  * @param after the higher exclusive bound for the sub-set
418  *
419  * @return   the corresponding sub-set of this sorted set
420  */
421 GeeSortedSet* gee_sorted_set_tail_set (GeeSortedSet* self, gconstpointer after) {
422         g_return_val_if_fail (self != NULL, NULL);
423         return GEE_SORTED_SET_GET_INTERFACE (self)->tail_set (self, after);
424 }
425
426
427 /**
428  * Returns the right-open sub-set of this sorted set, thus containing
429  * elements equal or higher than the specified ``from`` element, and stricly
430  * lower than the specified ``to`` element.
431  *
432  * @param from the lower inclusive bound for the sub-set
433  * @param to   the higher exclusive bound for the sub-set
434  *
435  * @return     the corresponding sub-set of this sorted set
436  */
437 GeeSortedSet* gee_sorted_set_sub_set (GeeSortedSet* self, gconstpointer from, gconstpointer to) {
438         g_return_val_if_fail (self != NULL, NULL);
439         return GEE_SORTED_SET_GET_INTERFACE (self)->sub_set (self, from, to);
440 }
441
442
443 /**
444  * Returns an immutable empty sorted set.
445  *
446  * @return an immutable empty sorted set
447  */
448 GeeSortedSet* gee_sorted_set_empty (GType g_type, GBoxedCopyFunc g_dup_func, GDestroyNotify g_destroy_func) {
449         GeeSortedSet* result = NULL;
450         GeeTreeSet* _tmp0_;
451         GeeTreeSet* _tmp1_;
452         GeeBidirSortedSet* _tmp2_;
453         GeeBidirSortedSet* _tmp3_;
454         GeeSortedSet* _tmp4_;
455         _tmp0_ = gee_tree_set_new (g_type, (GBoxedCopyFunc) g_dup_func, g_destroy_func, NULL, NULL, NULL);
456         _tmp1_ = _tmp0_;
457         _tmp2_ = gee_abstract_bidir_sorted_set_get_read_only_view ((GeeAbstractBidirSortedSet*) _tmp1_);
458         _tmp3_ = _tmp2_;
459         _tmp4_ = (GeeSortedSet*) _tmp3_;
460         _g_object_unref0 (_tmp1_);
461         result = _tmp4_;
462         return result;
463 }
464
465
466 GeeSortedSet* gee_sorted_set_get_read_only_view (GeeSortedSet* self) {
467         g_return_val_if_fail (self != NULL, NULL);
468         return GEE_SORTED_SET_GET_INTERFACE (self)->get_read_only_view (self);
469 }
470
471
472 static void gee_sorted_set_base_init (GeeSortedSetIface * iface) {
473         static gboolean initialized = FALSE;
474         if (!initialized) {
475                 initialized = TRUE;
476                 /**
477                  * The read-only view of this set.
478                  */
479                 g_object_interface_install_property (iface, g_param_spec_object ("read-only-view", "read-only-view", "read-only-view", GEE_TYPE_SORTED_SET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
480         }
481 }
482
483
484 /**
485  * A sorted set, which you can navigate over and get sub-sets of.
486  */
487 GType gee_sorted_set_get_type (void) {
488         static volatile gsize gee_sorted_set_type_id__volatile = 0;
489         if (g_once_init_enter (&gee_sorted_set_type_id__volatile)) {
490                 static const GTypeInfo g_define_type_info = { sizeof (GeeSortedSetIface), (GBaseInitFunc) gee_sorted_set_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
491                 GType gee_sorted_set_type_id;
492                 gee_sorted_set_type_id = g_type_register_static (G_TYPE_INTERFACE, "GeeSortedSet", &g_define_type_info, 0);
493                 g_type_interface_add_prerequisite (gee_sorted_set_type_id, GEE_TYPE_SET);
494                 g_once_init_leave (&gee_sorted_set_type_id__volatile, gee_sorted_set_type_id);
495         }
496         return gee_sorted_set_type_id__volatile;
497 }
498
499
500