131
126
/* FIXME: use hash table*/
132
127
if (g_utf8_collate (vala_named_argument_get_name (arg), name) == 0) {
133
128
if (VALA_IS_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg))) {
134
ValaLiteral* __temp2;
135
130
ValaLiteral* lit;
137
lit = (__temp2 = vala_literal_expression_get_literal ((VALA_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg)))), (__temp2 == NULL ? NULL : g_object_ref (__temp2)));
132
lit = (_tmp0 = vala_literal_expression_get_literal ((VALA_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg)))), (_tmp0 == NULL ? NULL : g_object_ref (_tmp0)));
138
133
if (VALA_IS_STRING_LITERAL (lit)) {
141
return (__temp3 = vala_string_literal_eval ((VALA_STRING_LITERAL (lit))), (lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL))), (arg == NULL ? NULL : (arg = (g_object_unref (arg), NULL))), (arg_it == NULL ? NULL : (arg_it = (g_object_unref (arg_it), NULL))), __temp3);
136
return (_tmp1 = vala_string_literal_eval ((VALA_STRING_LITERAL (lit))), (lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL))), (arg == NULL ? NULL : (arg = (g_object_unref (arg), NULL))), (arg_it == NULL ? NULL : (arg_it = (g_object_unref (arg_it), NULL))), _tmp1);
143
138
(lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL)));
174
168
/* FIXME: use hash table*/
175
169
if (g_utf8_collate (vala_named_argument_get_name (arg), name) == 0) {
176
170
if (VALA_IS_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg))) {
177
ValaLiteral* __temp5;
178
172
ValaLiteral* lit;
180
lit = (__temp5 = vala_literal_expression_get_literal ((VALA_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg)))), (__temp5 == NULL ? NULL : g_object_ref (__temp5)));
174
lit = (_tmp0 = vala_literal_expression_get_literal ((VALA_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg)))), (_tmp0 == NULL ? NULL : g_object_ref (_tmp0)));
181
175
if (VALA_IS_INTEGER_LITERAL (lit)) {
183
return (__temp6 = atoi (vala_integer_literal_get_value ((VALA_INTEGER_LITERAL (lit)))), (lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL))), (arg == NULL ? NULL : (arg = (g_object_unref (arg), NULL))), (arg_it == NULL ? NULL : (arg_it = (g_object_unref (arg_it), NULL))), __temp6);
177
return (_tmp1 = atoi (vala_integer_literal_get_value ((VALA_INTEGER_LITERAL (lit)))), (lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL))), (arg == NULL ? NULL : (arg = (g_object_unref (arg), NULL))), (arg_it == NULL ? NULL : (arg_it = (g_object_unref (arg_it), NULL))), _tmp1);
185
179
(lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL)));
216
209
/* FIXME: use hash table*/
217
210
if (g_utf8_collate (vala_named_argument_get_name (arg), name) == 0) {
218
211
if (VALA_IS_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg))) {
219
ValaLiteral* __temp8;
220
213
ValaLiteral* lit;
222
lit = (__temp8 = vala_literal_expression_get_literal ((VALA_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg)))), (__temp8 == NULL ? NULL : g_object_ref (__temp8)));
215
lit = (_tmp0 = vala_literal_expression_get_literal ((VALA_LITERAL_EXPRESSION (vala_named_argument_get_argument (arg)))), (_tmp0 == NULL ? NULL : g_object_ref (_tmp0)));
223
216
if (VALA_IS_BOOLEAN_LITERAL (lit)) {
225
return (__temp9 = vala_boolean_literal_get_value ((VALA_BOOLEAN_LITERAL (lit))), (lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL))), (arg == NULL ? NULL : (arg = (g_object_unref (arg), NULL))), (arg_it == NULL ? NULL : (arg_it = (g_object_unref (arg_it), NULL))), __temp9);
218
return (_tmp1 = vala_boolean_literal_get_value ((VALA_BOOLEAN_LITERAL (lit))), (lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL))), (arg == NULL ? NULL : (arg = (g_object_unref (arg), NULL))), (arg_it == NULL ? NULL : (arg_it = (g_object_unref (arg_it), NULL))), _tmp1);
227
220
(lit == NULL ? NULL : (lit = (g_object_unref (lit), NULL)));
239
char* vala_attribute_get_name (ValaAttribute* self)
232
char* vala_attribute_get_name (ValaAttribute* self) {
241
233
g_return_val_if_fail (VALA_IS_ATTRIBUTE (self), NULL);
242
234
return self->priv->_name;
246
void vala_attribute_set_name (ValaAttribute* self, const char* value)
238
void vala_attribute_set_name (ValaAttribute* self, const char* value) {
249
240
g_return_if_fail (VALA_IS_ATTRIBUTE (self));
251
self->priv->_name = (__temp12 = g_strdup (value), (self->priv->_name = (g_free (self->priv->_name), NULL)), __temp12);
242
self->priv->_name = (_tmp1 = g_strdup (value), (self->priv->_name = (g_free (self->priv->_name), NULL)), _tmp1);
255
static void vala_attribute_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec)
246
static void vala_attribute_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
257
247
ValaAttribute * self;
258
248
self = VALA_ATTRIBUTE (object);
259
249
switch (property_id) {
260
250
case VALA_ATTRIBUTE_NAME:
261
251
g_value_set_string (value, vala_attribute_get_name (self));
254
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
267
static void vala_attribute_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec)
260
static void vala_attribute_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
269
261
ValaAttribute * self;
270
262
self = VALA_ATTRIBUTE (object);
271
263
switch (property_id) {
272
264
case VALA_ATTRIBUTE_NAME:
273
265
vala_attribute_set_name (self, g_value_get_string (value));
268
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
279
static void vala_attribute_class_init (ValaAttributeClass * klass)
274
static void vala_attribute_class_init (ValaAttributeClass * klass) {
281
275
vala_attribute_parent_class = g_type_class_peek_parent (klass);
282
276
g_type_class_add_private (klass, sizeof (ValaAttributePrivate));
283
277
G_OBJECT_CLASS (klass)->get_property = vala_attribute_get_property;
284
278
G_OBJECT_CLASS (klass)->set_property = vala_attribute_set_property;
285
279
G_OBJECT_CLASS (klass)->dispose = vala_attribute_dispose;
286
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_ATTRIBUTE_NAME, g_param_spec_string ("name", "foo", "bar", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
280
g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_ATTRIBUTE_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
290
static void vala_attribute_init (ValaAttribute * self)
284
static void vala_attribute_init (ValaAttribute * self) {
292
285
self->priv = VALA_ATTRIBUTE_GET_PRIVATE (self);
293
286
self->args = GEE_LIST (gee_array_list_new (g_object_ref, g_object_unref, g_direct_equal));
297
static void vala_attribute_dispose (GObject * obj)
290
static void vala_attribute_dispose (GObject * obj) {
299
291
ValaAttribute * self;
300
ValaAttributeClass * klass;
301
GObjectClass * parent_class;
302
292
self = VALA_ATTRIBUTE (obj);
303
293
(self->priv->_name = (g_free (self->priv->_name), NULL));
304
294
(self->args == NULL ? NULL : (self->args = (g_object_unref (self->args), NULL)));
305
klass = VALA_ATTRIBUTE_CLASS (g_type_class_peek (VALA_TYPE_ATTRIBUTE));
306
parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
307
parent_class->dispose (obj);
295
G_OBJECT_CLASS (vala_attribute_parent_class)->dispose (obj);
311
GType vala_attribute_get_type (void)
299
GType vala_attribute_get_type (void) {
313
300
static GType vala_attribute_type_id = 0;
314
301
if (G_UNLIKELY (vala_attribute_type_id == 0)) {
315
302
static const GTypeInfo g_define_type_info = { sizeof (ValaAttributeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_attribute_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaAttribute), 0, (GInstanceInitFunc) vala_attribute_init };