/* valacallableexpression.c generated by valac, the Vala compiler
 * generated from valacallableexpression.vala, do not modify */

/* valacallableexpression.vala
 *
 * Copyright (C) 2021  Rico Tzschichholz
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 * 	Rico Tzschichholz <ricotz@ubuntu.com>
 */

#include "vala.h"
#include <glib.h>
#include <valagee.h>
#include <glib-object.h>

static GType vala_callable_expression_get_type_once (void);

gboolean
vala_callable_expression_get_is_yield_expression (ValaCallableExpression* self)
{
	ValaCallableExpressionIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->get_is_yield_expression) {
		return _iface_->get_is_yield_expression (self);
	}
	return FALSE;
}

void
vala_callable_expression_set_is_yield_expression (ValaCallableExpression* self,
                                                  gboolean value)
{
	ValaCallableExpressionIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->set_is_yield_expression) {
		_iface_->set_is_yield_expression (self, value);
	}
}

gboolean
vala_callable_expression_get_is_chainup (ValaCallableExpression* self)
{
	ValaCallableExpressionIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->get_is_chainup) {
		return _iface_->get_is_chainup (self);
	}
	return FALSE;
}

void
vala_callable_expression_set_is_chainup (ValaCallableExpression* self,
                                         gboolean value)
{
	ValaCallableExpressionIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->set_is_chainup) {
		_iface_->set_is_chainup (self, value);
	}
}

ValaExpression*
vala_callable_expression_get_call (ValaCallableExpression* self)
{
	ValaCallableExpressionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->get_call) {
		return _iface_->get_call (self);
	}
	return NULL;
}

/**
 * Appends the specified expression to the list of arguments.
 *
 * @param arg an argument
 */
void
vala_callable_expression_add_argument (ValaCallableExpression* self,
                                       ValaExpression* arg)
{
	ValaCallableExpressionIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->add_argument) {
		_iface_->add_argument (self, arg);
	}
}

/**
 * Returns the argument list.
 *
 * @return argument list
 */
ValaList*
vala_callable_expression_get_argument_list (ValaCallableExpression* self)
{
	ValaCallableExpressionIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = VALA_CALLABLE_EXPRESSION_GET_INTERFACE (self);
	if (_iface_->get_argument_list) {
		return _iface_->get_argument_list (self);
	}
	return NULL;
}

static void
vala_callable_expression_default_init (ValaCallableExpressionIface * iface,
                                       gpointer iface_data)
{
}

/**
 * Interface for all callable expressions.
 */
static GType
vala_callable_expression_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ValaCallableExpressionIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_callable_expression_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType vala_callable_expression_type_id;
	vala_callable_expression_type_id = g_type_register_static (G_TYPE_INTERFACE, "ValaCallableExpression", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (vala_callable_expression_type_id, VALA_TYPE_EXPRESSION);
	return vala_callable_expression_type_id;
}

GType
vala_callable_expression_get_type (void)
{
	static volatile gsize vala_callable_expression_type_id__once = 0;
	if (g_once_init_enter (&vala_callable_expression_type_id__once)) {
		GType vala_callable_expression_type_id;
		vala_callable_expression_type_id = vala_callable_expression_get_type_once ();
		g_once_init_leave (&vala_callable_expression_type_id__once, vala_callable_expression_type_id);
	}
	return vala_callable_expression_type_id__once;
}

