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

/*
 * Copyright © 2025 Alain M. (https://github.com/alainm23/planify)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA
 *
 * Authored by: Alain M. <alainmh23@gmail.com>
 */

#include "chrono.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.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  {
	CHRONO_LANGUAGE_PARSER_0_PROPERTY,
	CHRONO_LANGUAGE_PARSER_NUM_PROPERTIES
};
static GParamSpec* chrono_language_parser_properties[CHRONO_LANGUAGE_PARSER_NUM_PROPERTIES];

static gpointer chrono_language_parser_parent_class = NULL;

static ChronoParseResult* chrono_language_parser_real_parse (ChronoLanguageParser* self,
                                                      const gchar* text,
                                                      gboolean parse_recurrence);
static GType chrono_language_parser_get_type_once (void);

static ChronoParseResult*
chrono_language_parser_real_parse (ChronoLanguageParser* self,
                                   const gchar* text,
                                   gboolean parse_recurrence)
{
	g_critical ("Type `%s' does not implement abstract method `chrono_language_parser_parse'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return NULL;
}

ChronoParseResult*
chrono_language_parser_parse (ChronoLanguageParser* self,
                              const gchar* text,
                              gboolean parse_recurrence)
{
	ChronoLanguageParserClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = CHRONO_LANGUAGE_PARSER_GET_CLASS (self);
	if (_klass_->parse) {
		return _klass_->parse (self, text, parse_recurrence);
	}
	return NULL;
}

ChronoLanguageParser*
chrono_language_parser_construct (GType object_type)
{
	ChronoLanguageParser * self = NULL;
	self = (ChronoLanguageParser*) g_object_new (object_type, NULL);
	return self;
}

static void
chrono_language_parser_class_init (ChronoLanguageParserClass * klass,
                                   gpointer klass_data)
{
	chrono_language_parser_parent_class = g_type_class_peek_parent (klass);
	((ChronoLanguageParserClass *) klass)->parse = (ChronoParseResult* (*) (ChronoLanguageParser*, const gchar*, gboolean)) chrono_language_parser_real_parse;
}

static void
chrono_language_parser_instance_init (ChronoLanguageParser * self,
                                      gpointer klass)
{
}

 G_GNUC_NO_INLINE static GType
chrono_language_parser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ChronoLanguageParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) chrono_language_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ChronoLanguageParser), 0, (GInstanceInitFunc) chrono_language_parser_instance_init, NULL };
	GType chrono_language_parser_type_id;
	chrono_language_parser_type_id = g_type_register_static (G_TYPE_OBJECT, "ChronoLanguageParser", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return chrono_language_parser_type_id;
}

GType
chrono_language_parser_get_type (void)
{
	static gsize chrono_language_parser_type_id__once = 0;
	if (g_once_init_enter (&chrono_language_parser_type_id__once)) {
		GType chrono_language_parser_type_id;
		chrono_language_parser_type_id = chrono_language_parser_get_type_once ();
		g_once_init_leave (&chrono_language_parser_type_id__once, chrono_language_parser_type_id);
	}
	return chrono_language_parser_type_id__once;
}

