/* gcalc-minus.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from gcalc-minus.vala, do not modify */

/* gcalc-minus.vala
 *
 * Copyright (C) 2018  Daniel Espinosa <esodan@gmail.com>
 *
 * 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, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *      Daniel Espinosa <esodan@gmail.com>
 */

#include "gcalc/gcalc.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include "gcalc.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	GCALC_MINUS_0_PROPERTY,
	GCALC_MINUS_NUM_PROPERTIES
};
static GParamSpec* gcalc_minus_properties[GCALC_MINUS_NUM_PROPERTIES];

static gpointer gcalc_minus_parent_class = NULL;
static GCalcMathOperatorIface * gcalc_minus_gcalc_math_operator_parent_iface = NULL;
static GCalcMathBinaryOperatorIface * gcalc_minus_gcalc_math_binary_operator_parent_iface = NULL;
static GCalcMathMinusIface * gcalc_minus_gcalc_math_minus_parent_iface = NULL;

VALA_EXTERN gchar* gcalc_expression_to_string (GCalcExpression* self);
static gchar* gcalc_minus_real_to_string (GCalcExpression* base);
static GType gcalc_minus_get_type_once (void);

static gchar*
gcalc_minus_real_to_string (GCalcExpression* base)
{
	GCalcMinus * self;
	gchar* _tmp0_;
	gchar* result;
	self = (GCalcMinus*) base;
	_tmp0_ = g_strdup ("-");
	result = _tmp0_;
	return result;
}

GCalcMinus*
gcalc_minus_construct (GType object_type)
{
	GCalcMinus * self = NULL;
	self = (GCalcMinus*) gcalc_expression_construct (object_type);
	return self;
}

GCalcMinus*
gcalc_minus_new (void)
{
	return gcalc_minus_construct (GCALC_TYPE_MINUS);
}

static void
gcalc_minus_class_init (GCalcMinusClass * klass,
                        gpointer klass_data)
{
	gcalc_minus_parent_class = g_type_class_peek_parent (klass);
	((GCalcExpressionClass *) klass)->to_string = (gchar* (*) (GCalcExpression*)) gcalc_minus_real_to_string;
}

static void
gcalc_minus_gcalc_math_operator_interface_init (GCalcMathOperatorIface * iface,
                                                gpointer iface_data)
{
	gcalc_minus_gcalc_math_operator_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gcalc_minus_gcalc_math_binary_operator_interface_init (GCalcMathBinaryOperatorIface * iface,
                                                       gpointer iface_data)
{
	gcalc_minus_gcalc_math_binary_operator_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gcalc_minus_gcalc_math_minus_interface_init (GCalcMathMinusIface * iface,
                                             gpointer iface_data)
{
	gcalc_minus_gcalc_math_minus_parent_iface = g_type_interface_peek_parent (iface);
}

static void
gcalc_minus_instance_init (GCalcMinus * self,
                           gpointer klass)
{
}

/**
 * An implementation of {@link MathMinus}
 */
static GType
gcalc_minus_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GCalcMinusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gcalc_minus_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GCalcMinus), 0, (GInstanceInitFunc) gcalc_minus_instance_init, NULL };
	static const GInterfaceInfo gcalc_math_operator_info = { (GInterfaceInitFunc) gcalc_minus_gcalc_math_operator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gcalc_math_binary_operator_info = { (GInterfaceInitFunc) gcalc_minus_gcalc_math_binary_operator_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gcalc_math_minus_info = { (GInterfaceInitFunc) gcalc_minus_gcalc_math_minus_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType gcalc_minus_type_id;
	gcalc_minus_type_id = g_type_register_static (GCALC_TYPE_EXPRESSION, "GCalcMinus", &g_define_type_info, 0);
	g_type_add_interface_static (gcalc_minus_type_id, GCALC_TYPE_MATH_OPERATOR, &gcalc_math_operator_info);
	g_type_add_interface_static (gcalc_minus_type_id, GCALC_TYPE_MATH_BINARY_OPERATOR, &gcalc_math_binary_operator_info);
	g_type_add_interface_static (gcalc_minus_type_id, GCALC_TYPE_MATH_MINUS, &gcalc_math_minus_info);
	return gcalc_minus_type_id;
}

GType
gcalc_minus_get_type (void)
{
	static volatile gsize gcalc_minus_type_id__once = 0;
	if (g_once_init_enter (&gcalc_minus_type_id__once)) {
		GType gcalc_minus_type_id;
		gcalc_minus_type_id = gcalc_minus_get_type_once ();
		g_once_init_leave (&gcalc_minus_type_id__once, gcalc_minus_type_id);
	}
	return gcalc_minus_type_id__once;
}

