1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
|
/* KeyValueMap.c generated by valac 0.34.2, the Vala compiler
* generated from KeyValueMap.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <stdio.h>
#include <gobject/gvaluecollector.h>
#define TYPE_KEY_VALUE_MAP (key_value_map_get_type ())
#define KEY_VALUE_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_KEY_VALUE_MAP, KeyValueMap))
#define KEY_VALUE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_KEY_VALUE_MAP, KeyValueMapClass))
#define IS_KEY_VALUE_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_KEY_VALUE_MAP))
#define IS_KEY_VALUE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_KEY_VALUE_MAP))
#define KEY_VALUE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_KEY_VALUE_MAP, KeyValueMapClass))
typedef struct _KeyValueMap KeyValueMap;
typedef struct _KeyValueMapClass KeyValueMapClass;
typedef struct _KeyValueMapPrivate KeyValueMapPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _key_value_map_unref0(var) ((var == NULL) ? NULL : (var = (key_value_map_unref (var), NULL)))
typedef struct _ParamSpecKeyValueMap ParamSpecKeyValueMap;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
struct _KeyValueMap {
GTypeInstance parent_instance;
volatile int ref_count;
KeyValueMapPrivate * priv;
};
struct _KeyValueMapClass {
GTypeClass parent_class;
void (*finalize) (KeyValueMap *self);
};
struct _KeyValueMapPrivate {
gchar* group;
GeeHashMap* map;
};
struct _ParamSpecKeyValueMap {
GParamSpec parent_instance;
};
static gpointer key_value_map_parent_class = NULL;
gpointer key_value_map_ref (gpointer instance);
void key_value_map_unref (gpointer instance);
GParamSpec* param_spec_key_value_map (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_key_value_map (GValue* value, gpointer v_object);
void value_take_key_value_map (GValue* value, gpointer v_object);
gpointer value_get_key_value_map (const GValue* value);
GType key_value_map_get_type (void) G_GNUC_CONST;
#define KEY_VALUE_MAP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_KEY_VALUE_MAP, KeyValueMapPrivate))
enum {
KEY_VALUE_MAP_DUMMY_PROPERTY
};
KeyValueMap* key_value_map_new (const gchar* group);
KeyValueMap* key_value_map_construct (GType object_type, const gchar* group);
KeyValueMap* key_value_map_copy (KeyValueMap* self);
gchar* key_value_map_get_group (KeyValueMap* self);
GeeSet* key_value_map_get_keys (KeyValueMap* self);
gboolean key_value_map_has_key (KeyValueMap* self, const gchar* key);
void key_value_map_set_string (KeyValueMap* self, const gchar* key, const gchar* value);
void key_value_map_set_int (KeyValueMap* self, const gchar* key, gint value);
void key_value_map_set_double (KeyValueMap* self, const gchar* key, gdouble value);
void key_value_map_set_float (KeyValueMap* self, const gchar* key, gfloat value);
void key_value_map_set_bool (KeyValueMap* self, const gchar* key, gboolean value);
gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gchar* def);
gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def);
gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble def);
gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def);
gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean def);
void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def, GdkPoint* result);
void key_value_map_set_point (KeyValueMap* self, const gchar* key, GdkPoint* point);
static void key_value_map_finalize (KeyValueMap* obj);
KeyValueMap* key_value_map_construct (GType object_type, const gchar* group) {
KeyValueMap* self = NULL;
const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (group != NULL, NULL);
#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self = (KeyValueMap*) g_type_create_instance (object_type);
#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = group;
#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = g_strdup (_tmp0_);
#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (self->priv->group);
#line 12 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self->priv->group = _tmp1_;
#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return self;
#line 115 "KeyValueMap.c"
}
KeyValueMap* key_value_map_new (const gchar* group) {
#line 11 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return key_value_map_construct (TYPE_KEY_VALUE_MAP, group);
#line 122 "KeyValueMap.c"
}
KeyValueMap* key_value_map_copy (KeyValueMap* self) {
KeyValueMap* result = NULL;
KeyValueMap* clone = NULL;
const gchar* _tmp0_ = NULL;
KeyValueMap* _tmp1_ = NULL;
#line 15 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->group;
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key_value_map_new (_tmp0_);
#line 16 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
clone = _tmp1_;
#line 139 "KeyValueMap.c"
{
GeeIterator* _key_it = NULL;
GeeHashMap* _tmp2_ = NULL;
GeeSet* _tmp3_ = NULL;
GeeSet* _tmp4_ = NULL;
GeeSet* _tmp5_ = NULL;
GeeIterator* _tmp6_ = NULL;
GeeIterator* _tmp7_ = NULL;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = self->priv->map;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_MAP, GeeMap));
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = _tmp3_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = _tmp4_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ITERABLE, GeeIterable));
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = _tmp6_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_object_unref0 (_tmp5_);
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_key_it = _tmp7_;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
while (TRUE) {
#line 166 "KeyValueMap.c"
GeeIterator* _tmp8_ = NULL;
gboolean _tmp9_ = FALSE;
gchar* key = NULL;
GeeIterator* _tmp10_ = NULL;
gpointer _tmp11_ = NULL;
KeyValueMap* _tmp12_ = NULL;
GeeHashMap* _tmp13_ = NULL;
const gchar* _tmp14_ = NULL;
GeeHashMap* _tmp15_ = NULL;
const gchar* _tmp16_ = NULL;
gpointer _tmp17_ = NULL;
gchar* _tmp18_ = NULL;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp8_ = _key_it;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp9_ = gee_iterator_next (_tmp8_);
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (!_tmp9_) {
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
break;
#line 187 "KeyValueMap.c"
}
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp10_ = _key_it;
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp11_ = gee_iterator_get (_tmp10_);
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key = (gchar*) _tmp11_;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp12_ = clone;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp13_ = _tmp12_->priv->map;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp14_ = key;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp15_ = self->priv->map;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp16_ = key;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp17_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp16_);
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp18_ = (gchar*) _tmp17_;
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp14_, _tmp18_);
#line 18 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (_tmp18_);
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (key);
#line 215 "KeyValueMap.c"
}
#line 17 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_object_unref0 (_key_it);
#line 219 "KeyValueMap.c"
}
#line 20 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = clone;
#line 20 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 225 "KeyValueMap.c"
}
gchar* key_value_map_get_group (KeyValueMap* self) {
gchar* result = NULL;
const gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
#line 23 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->group;
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = g_strdup (_tmp0_);
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp1_;
#line 24 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 243 "KeyValueMap.c"
}
GeeSet* key_value_map_get_keys (KeyValueMap* self) {
GeeSet* result = NULL;
GeeHashMap* _tmp0_ = NULL;
GeeSet* _tmp1_ = NULL;
GeeSet* _tmp2_ = NULL;
#line 27 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap));
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = _tmp1_;
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp2_;
#line 28 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 264 "KeyValueMap.c"
}
gboolean key_value_map_has_key (KeyValueMap* self, const gchar* key) {
gboolean result = FALSE;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
#line 31 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), FALSE);
#line 31 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (key != NULL, FALSE);
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_has_key (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp2_;
#line 32 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 287 "KeyValueMap.c"
}
void key_value_map_set_string (KeyValueMap* self, const gchar* key, const gchar* value) {
const gchar* _tmp0_ = NULL;
GeeHashMap* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 35 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (value != NULL);
#line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = key;
#line 36 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_vala_assert (_tmp0_ != NULL, "key != null");
#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = self->priv->map;
#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = key;
#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = value;
#line 38 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp3_);
#line 314 "KeyValueMap.c"
}
void key_value_map_set_int (KeyValueMap* self, const gchar* key, gint value) {
const gchar* _tmp0_ = NULL;
GeeHashMap* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gint _tmp3_ = 0;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
#line 41 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 41 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = key;
#line 42 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_vala_assert (_tmp0_ != NULL, "key != null");
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = self->priv->map;
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = key;
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = value;
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = g_strdup_printf ("%i", _tmp3_);
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = _tmp4_;
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
#line 44 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (_tmp5_);
#line 347 "KeyValueMap.c"
}
static gchar* double_to_string (gdouble self) {
gchar* result = NULL;
gchar* _tmp0_ = NULL;
gchar* _tmp1_ = NULL;
gint _tmp1__length1 = 0;
const gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = _tmp0_;
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp3_ = g_strdup (_tmp2_);
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp4_ = _tmp3_;
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = (g_free (_tmp1_), NULL);
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp4_;
#line 863 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 377 "KeyValueMap.c"
}
void key_value_map_set_double (KeyValueMap* self, const gchar* key, gdouble value) {
const gchar* _tmp0_ = NULL;
GeeHashMap* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gdouble _tmp3_ = 0.0;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
#line 47 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 47 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = key;
#line 48 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_vala_assert (_tmp0_ != NULL, "key != null");
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = self->priv->map;
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = key;
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = value;
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = double_to_string (_tmp3_);
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = _tmp4_;
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
#line 50 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (_tmp5_);
#line 410 "KeyValueMap.c"
}
void key_value_map_set_float (KeyValueMap* self, const gchar* key, gfloat value) {
const gchar* _tmp0_ = NULL;
GeeHashMap* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gfloat _tmp3_ = 0.0F;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
#line 53 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 53 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = key;
#line 54 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_vala_assert (_tmp0_ != NULL, "key != null");
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = self->priv->map;
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = key;
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = value;
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = g_strdup_printf ("%g", _tmp3_);
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = _tmp4_;
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
#line 56 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (_tmp5_);
#line 443 "KeyValueMap.c"
}
static gchar* bool_to_string (gboolean self) {
gchar* result = NULL;
#line 37 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (self) {
#line 451 "KeyValueMap.c"
gchar* _tmp0_ = NULL;
#line 38 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = g_strdup ("true");
#line 38 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp0_;
#line 38 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 459 "KeyValueMap.c"
} else {
gchar* _tmp1_ = NULL;
#line 40 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = g_strdup ("false");
#line 40 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp1_;
#line 40 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 468 "KeyValueMap.c"
}
}
void key_value_map_set_bool (KeyValueMap* self, const gchar* key, gboolean value) {
const gchar* _tmp0_ = NULL;
GeeHashMap* _tmp1_ = NULL;
const gchar* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
#line 59 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 59 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = key;
#line 60 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_vala_assert (_tmp0_ != NULL, "key != null");
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = self->priv->map;
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = key;
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = value;
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = bool_to_string (_tmp3_);
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = _tmp4_;
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp2_, _tmp5_);
#line 62 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (_tmp5_);
#line 502 "KeyValueMap.c"
}
gchar* key_value_map_get_string (KeyValueMap* self, const gchar* key, const gchar* def) {
gchar* result = NULL;
gchar* value = NULL;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
const gchar* _tmp4_ = NULL;
gchar* _tmp7_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), NULL);
#line 65 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (key != NULL, NULL);
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 66 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value = (gchar*) _tmp2_;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = value;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp4_ != NULL) {
#line 531 "KeyValueMap.c"
const gchar* _tmp5_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = value;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp5_;
#line 537 "KeyValueMap.c"
} else {
const gchar* _tmp6_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = def;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp6_;
#line 544 "KeyValueMap.c"
}
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = g_strdup (_tmp3_);
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp7_;
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 68 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 554 "KeyValueMap.c"
}
gint key_value_map_get_int (KeyValueMap* self, const gchar* key, gint def) {
gint result = 0;
gchar* value = NULL;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
gint _tmp3_ = 0;
const gchar* _tmp4_ = NULL;
#line 71 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0);
#line 71 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (key != NULL, 0);
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 72 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value = (gchar*) _tmp2_;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = value;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp4_ != NULL) {
#line 582 "KeyValueMap.c"
const gchar* _tmp5_ = NULL;
gint _tmp6_ = 0;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = value;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = atoi (_tmp5_);
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp6_;
#line 591 "KeyValueMap.c"
} else {
gint _tmp7_ = 0;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = def;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp7_;
#line 598 "KeyValueMap.c"
}
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp3_;
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 74 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 606 "KeyValueMap.c"
}
static gdouble double_parse (const gchar* str) {
gdouble result = 0.0;
const gchar* _tmp0_ = NULL;
gdouble _tmp1_ = 0.0;
#line 869 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (str != NULL, 0.0);
#line 870 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = str;
#line 870 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp1_ = g_ascii_strtod (_tmp0_, NULL);
#line 870 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = _tmp1_;
#line 870 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 624 "KeyValueMap.c"
}
gdouble key_value_map_get_double (KeyValueMap* self, const gchar* key, gdouble def) {
gdouble result = 0.0;
gchar* value = NULL;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
gdouble _tmp3_ = 0.0;
const gchar* _tmp4_ = NULL;
#line 77 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0.0);
#line 77 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (key != NULL, 0.0);
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 78 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value = (gchar*) _tmp2_;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = value;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp4_ != NULL) {
#line 652 "KeyValueMap.c"
const gchar* _tmp5_ = NULL;
gdouble _tmp6_ = 0.0;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = value;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = double_parse (_tmp5_);
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp6_;
#line 661 "KeyValueMap.c"
} else {
gdouble _tmp7_ = 0.0;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = def;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp7_;
#line 668 "KeyValueMap.c"
}
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp3_;
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 80 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 676 "KeyValueMap.c"
}
gfloat key_value_map_get_float (KeyValueMap* self, const gchar* key, gfloat def) {
gfloat result = 0.0F;
gchar* value = NULL;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
gfloat _tmp3_ = 0.0F;
const gchar* _tmp4_ = NULL;
#line 83 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), 0.0F);
#line 83 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (key != NULL, 0.0F);
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 84 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value = (gchar*) _tmp2_;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = value;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp4_ != NULL) {
#line 704 "KeyValueMap.c"
const gchar* _tmp5_ = NULL;
gdouble _tmp6_ = 0.0;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = value;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = double_parse (_tmp5_);
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = (gfloat) _tmp6_;
#line 713 "KeyValueMap.c"
} else {
gfloat _tmp7_ = 0.0F;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = def;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp7_;
#line 720 "KeyValueMap.c"
}
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp3_;
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 86 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 728 "KeyValueMap.c"
}
static gboolean bool_parse (const gchar* str) {
gboolean result = FALSE;
const gchar* _tmp0_ = NULL;
#line 44 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
g_return_val_if_fail (str != NULL, FALSE);
#line 45 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
_tmp0_ = str;
#line 45 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
if (g_strcmp0 (_tmp0_, "true") == 0) {
#line 46 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = TRUE;
#line 46 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 745 "KeyValueMap.c"
} else {
#line 48 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
result = FALSE;
#line 48 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
return result;
#line 751 "KeyValueMap.c"
}
}
gboolean key_value_map_get_bool (KeyValueMap* self, const gchar* key, gboolean def) {
gboolean result = FALSE;
gchar* value = NULL;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
const gchar* _tmp4_ = NULL;
#line 89 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (IS_KEY_VALUE_MAP (self), FALSE);
#line 89 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (key != NULL, FALSE);
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 90 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value = (gchar*) _tmp2_;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = value;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp4_ != NULL) {
#line 780 "KeyValueMap.c"
const gchar* _tmp5_ = NULL;
gboolean _tmp6_ = FALSE;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = value;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = bool_parse (_tmp5_);
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp6_;
#line 789 "KeyValueMap.c"
} else {
gboolean _tmp7_ = FALSE;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = def;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp7_;
#line 796 "KeyValueMap.c"
}
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
result = _tmp3_;
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 92 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return result;
#line 804 "KeyValueMap.c"
}
void key_value_map_get_point (KeyValueMap* self, const gchar* key, GdkPoint* def, GdkPoint* result) {
gchar* value = NULL;
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
const gchar* _tmp3_ = NULL;
#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (def != NULL);
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 101 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value = (gchar*) _tmp2_;
#line 103 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = value;
#line 103 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp3_ == NULL) {
#line 832 "KeyValueMap.c"
GdkPoint _tmp4_ = {0};
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = *def;
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*result = _tmp4_;
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 104 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return;
#line 842 "KeyValueMap.c"
} else {
GdkPoint _result_ = {0};
GdkPoint _tmp5_ = {0};
const gchar* _tmp6_ = NULL;
gint _tmp7_ = 0;
#line 106 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_.x = 0;
#line 106 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_result_ = _tmp5_;
#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = value;
#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = sscanf (_tmp6_, "(%d, %d)", &_result_.x, &_result_.y);
#line 107 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (_tmp7_ == 2) {
#line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*result = _result_;
#line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 108 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return;
#line 864 "KeyValueMap.c"
} else {
GdkPoint _tmp8_ = {0};
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp8_ = *def;
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*result = _tmp8_;
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 110 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return;
#line 875 "KeyValueMap.c"
}
}
#line 100 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (value);
#line 880 "KeyValueMap.c"
}
void key_value_map_set_point (KeyValueMap* self, const gchar* key, GdkPoint* point) {
GeeHashMap* _tmp0_ = NULL;
const gchar* _tmp1_ = NULL;
GdkPoint _tmp2_ = {0};
gint _tmp3_ = 0;
GdkPoint _tmp4_ = {0};
gint _tmp5_ = 0;
gchar* _tmp6_ = NULL;
gchar* _tmp7_ = NULL;
#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (IS_KEY_VALUE_MAP (self));
#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (key != NULL);
#line 114 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (point != NULL);
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = self->priv->map;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp1_ = key;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp2_ = *point;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp3_ = _tmp2_.x;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp4_ = *point;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp5_ = _tmp4_.y;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp6_ = g_strdup_printf ("(%d, %d)", _tmp3_, _tmp5_);
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp7_ = _tmp6_;
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, _tmp7_);
#line 115 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (_tmp7_);
#line 919 "KeyValueMap.c"
}
static void value_key_value_map_init (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
#line 926 "KeyValueMap.c"
}
static void value_key_value_map_free_value (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key_value_map_unref (value->data[0].v_pointer);
#line 935 "KeyValueMap.c"
}
}
static void value_key_value_map_copy_value (const GValue* src_value, GValue* dest_value) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (src_value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
dest_value->data[0].v_pointer = key_value_map_ref (src_value->data[0].v_pointer);
#line 945 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
dest_value->data[0].v_pointer = NULL;
#line 949 "KeyValueMap.c"
}
}
static gpointer value_key_value_map_peek_pointer (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return value->data[0].v_pointer;
#line 957 "KeyValueMap.c"
}
static gchar* value_key_value_map_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (collect_values[0].v_pointer) {
#line 964 "KeyValueMap.c"
KeyValueMap* object;
object = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (object->parent_instance.g_class == NULL) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 971 "KeyValueMap.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 975 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = key_value_map_ref (object);
#line 979 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
#line 983 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return NULL;
#line 987 "KeyValueMap.c"
}
static gchar* value_key_value_map_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
KeyValueMap** object_p;
object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (!object_p) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 998 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (!value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*object_p = NULL;
#line 1004 "KeyValueMap.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*object_p = value->data[0].v_pointer;
#line 1008 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
*object_p = key_value_map_ref (value->data[0].v_pointer);
#line 1012 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return NULL;
#line 1016 "KeyValueMap.c"
}
GParamSpec* param_spec_key_value_map (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
ParamSpecKeyValueMap* spec;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_KEY_VALUE_MAP), NULL);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return G_PARAM_SPEC (spec);
#line 1030 "KeyValueMap.c"
}
gpointer value_get_key_value_map (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_KEY_VALUE_MAP), NULL);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return value->data[0].v_pointer;
#line 1039 "KeyValueMap.c"
}
void value_set_key_value_map (GValue* value, gpointer v_object) {
KeyValueMap* old;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_KEY_VALUE_MAP));
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_KEY_VALUE_MAP));
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = v_object;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key_value_map_ref (value->data[0].v_pointer);
#line 1059 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
#line 1063 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (old) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key_value_map_unref (old);
#line 1069 "KeyValueMap.c"
}
}
void value_take_key_value_map (GValue* value, gpointer v_object) {
KeyValueMap* old;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_KEY_VALUE_MAP));
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_KEY_VALUE_MAP));
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = v_object;
#line 1088 "KeyValueMap.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
value->data[0].v_pointer = NULL;
#line 1092 "KeyValueMap.c"
}
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (old) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key_value_map_unref (old);
#line 1098 "KeyValueMap.c"
}
}
static void key_value_map_class_init (KeyValueMapClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
key_value_map_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
((KeyValueMapClass *) klass)->finalize = key_value_map_finalize;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_type_class_add_private (klass, sizeof (KeyValueMapPrivate));
#line 1110 "KeyValueMap.c"
}
static void key_value_map_instance_init (KeyValueMap * self) {
GeeHashMap* _tmp0_ = NULL;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self->priv = KEY_VALUE_MAP_GET_PRIVATE (self);
#line 9 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 9 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self->priv->map = _tmp0_;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self->ref_count = 1;
#line 1124 "KeyValueMap.c"
}
static void key_value_map_finalize (KeyValueMap* obj) {
KeyValueMap * self;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_KEY_VALUE_MAP, KeyValueMap);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_signal_handlers_destroy (self);
#line 8 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_free0 (self->priv->group);
#line 9 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
_g_object_unref0 (self->priv->map);
#line 1138 "KeyValueMap.c"
}
GType key_value_map_get_type (void) {
static volatile gsize key_value_map_type_id__volatile = 0;
if (g_once_init_enter (&key_value_map_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_key_value_map_init, value_key_value_map_free_value, value_key_value_map_copy_value, value_key_value_map_peek_pointer, "p", value_key_value_map_collect_value, "p", value_key_value_map_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (KeyValueMapClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) key_value_map_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (KeyValueMap), 0, (GInstanceInitFunc) key_value_map_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType key_value_map_type_id;
key_value_map_type_id = g_type_register_fundamental (g_type_fundamental_next (), "KeyValueMap", &g_define_type_info, &g_define_type_fundamental_info, 0);
g_once_init_leave (&key_value_map_type_id__volatile, key_value_map_type_id);
}
return key_value_map_type_id__volatile;
}
gpointer key_value_map_ref (gpointer instance) {
KeyValueMap* self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_atomic_int_inc (&self->ref_count);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
return instance;
#line 1163 "KeyValueMap.c"
}
void key_value_map_unref (gpointer instance) {
KeyValueMap* self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
KEY_VALUE_MAP_GET_CLASS (self)->finalize (self);
#line 7 "/home/jens/Source/shotwell/src/util/KeyValueMap.vala"
g_type_free_instance ((GTypeInstance *) self);
#line 1176 "KeyValueMap.c"
}
}
|