/* valaclass.vala
 *
 * Copyright (C) 2006-2009  Jürg Billeter
 *
 * 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:
 * 	Jürg Billeter <j@bitron.ch>
 */

#ifndef __VALA_VALACLASS_H__
#define __VALA_VALACLASS_H__

#include <glib.h>
#include <glib-object.h>
#include <gee/list.h>
#include <stdlib.h>
#include <string.h>
#include <vala/valaobjecttypesymbol.h>
#include <vala/valacodenode.h>

G_BEGIN_DECLS


#define VALA_TYPE_CLASS (vala_class_get_type ())
#define VALA_CLASS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_CLASS, ValaClass))
#define VALA_CLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_CLASS, ValaClassClass))
#define VALA_IS_CLASS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_CLASS))
#define VALA_IS_CLASS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_CLASS))
#define VALA_CLASS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_CLASS, ValaClassClass))

typedef struct _ValaClassPrivate ValaClassPrivate;

/**
 * Represents a class declaration in the source code.
 */
struct _ValaClass {
	ValaObjectTypeSymbol parent_instance;
	ValaClassPrivate * priv;
};

struct _ValaClassClass {
	ValaObjectTypeSymbolClass parent_class;
};


GeeList* vala_class_get_classes (ValaClass* self);
GeeList* vala_class_get_structs (ValaClass* self);
GeeList* vala_class_get_enums (ValaClass* self);
GeeList* vala_class_get_delegates (ValaClass* self);
ValaClass* vala_class_construct (GType object_type, const char* name, ValaSourceReference* source_reference);
ValaClass* vala_class_new (const char* name, ValaSourceReference* source_reference);
void vala_class_add_base_type (ValaClass* self, ValaDataType* type);
GeeList* vala_class_get_base_types (ValaClass* self);
void vala_class_add_constant (ValaClass* self, ValaConstant* c);
void vala_class_add_field (ValaClass* self, ValaField* f);
GeeList* vala_class_get_fields (ValaClass* self);
GeeList* vala_class_get_constants (ValaClass* self);
void vala_class_add_method (ValaClass* self, ValaMethod* m);
void vala_class_add_property (ValaClass* self, ValaProperty* prop);
void vala_class_add_signal (ValaClass* self, ValaSignal* sig);
void vala_class_add_class (ValaClass* self, ValaClass* cl);
void vala_class_add_struct (ValaClass* self, ValaStruct* st);
void vala_class_add_enum (ValaClass* self, ValaEnum* en);
void vala_class_add_delegate (ValaClass* self, ValaDelegate* d);
char* vala_class_get_default_cname (ValaClass* self);
void vala_class_set_cname (ValaClass* self, const char* cname);
void vala_class_process_attributes (ValaClass* self);
void vala_class_set_type_id (ValaClass* self, const char* type_id);
void vala_class_set_param_spec_function (ValaClass* self, const char* name);
gboolean vala_class_is_fundamental (ValaClass* self);
void vala_class_set_ref_function (ValaClass* self, const char* name);
void vala_class_set_unref_function (ValaClass* self, const char* name);
void vala_class_set_ref_sink_function (ValaClass* self, const char* name);
void vala_class_set_dup_function (ValaClass* self, const char* name);
char* vala_class_get_default_free_function (ValaClass* self);
void vala_class_set_free_function (ValaClass* self, const char* name);
ValaClass* vala_class_get_base_class (ValaClass* self);
void vala_class_set_base_class (ValaClass* self, ValaClass* value);
gboolean vala_class_get_is_abstract (ValaClass* self);
void vala_class_set_is_abstract (ValaClass* self, gboolean value);
gboolean vala_class_get_is_compact (ValaClass* self);
void vala_class_set_is_compact (ValaClass* self, gboolean value);
gboolean vala_class_get_is_immutable (ValaClass* self);
void vala_class_set_is_immutable (ValaClass* self, gboolean value);
gboolean vala_class_get_ref_function_void (ValaClass* self);
void vala_class_set_ref_function_void (ValaClass* self, gboolean value);
const char* vala_class_get_type_check_function (ValaClass* self);
void vala_class_set_type_check_function (ValaClass* self, const char* value);
gboolean vala_class_get_has_private_fields (ValaClass* self);
gboolean vala_class_get_has_class_private_fields (ValaClass* self);
ValaMethod* vala_class_get_default_construction_method (ValaClass* self);
void vala_class_set_default_construction_method (ValaClass* self, ValaMethod* value);
ValaConstructor* vala_class_get_constructor (ValaClass* self);
void vala_class_set_constructor (ValaClass* self, ValaConstructor* value);
ValaConstructor* vala_class_get_class_constructor (ValaClass* self);
void vala_class_set_class_constructor (ValaClass* self, ValaConstructor* value);
ValaConstructor* vala_class_get_static_constructor (ValaClass* self);
void vala_class_set_static_constructor (ValaClass* self, ValaConstructor* value);
ValaDestructor* vala_class_get_destructor (ValaClass* self);
void vala_class_set_destructor (ValaClass* self, ValaDestructor* value);
ValaDestructor* vala_class_get_static_destructor (ValaClass* self);
void vala_class_set_static_destructor (ValaClass* self, ValaDestructor* value);
ValaDestructor* vala_class_get_class_destructor (ValaClass* self);
void vala_class_set_class_destructor (ValaClass* self, ValaDestructor* value);
gboolean vala_class_get_is_error_base (ValaClass* self);
GType vala_class_get_type (void);


G_END_DECLS

#endif
