1 /* doclet.c generated by valac, the Vala compiler
2  * generated from doclet.vala, do not modify */
3 
4 /* doclet.vala
5  *
6  * Copyright (C) 2008-2009 Florian Brosch
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
21  *
22  * Author:
23  * 	Brosch Florian <flo.brosch@gmail.com>
24  */
25 
26 #include "valadoc.h"
27 #include <glib.h>
28 
29 static GType valadoc_doclet_get_type_once (void);
30 
31 /**
32  * Allows the doclet to inspect the given {@link Api.Tree}
33  *
34  * @param settings various configurations
35  * @param tree the tree to inspect
36  * @param reporter the reporter to use
37  * @see Content.ContentVisitor
38  * @see Api.Visitor
39  */
40 void
valadoc_doclet_process(ValadocDoclet * self,ValadocSettings * settings,ValadocApiTree * tree,ValadocErrorReporter * reporter)41 valadoc_doclet_process (ValadocDoclet* self,
42                         ValadocSettings* settings,
43                         ValadocApiTree* tree,
44                         ValadocErrorReporter* reporter)
45 {
46 	g_return_if_fail (self != NULL);
47 	VALADOC_DOCLET_GET_INTERFACE (self)->process (self, settings, tree, reporter);
48 }
49 
50 static void
valadoc_doclet_default_init(ValadocDocletIface * iface,gpointer iface_data)51 valadoc_doclet_default_init (ValadocDocletIface * iface,
52                              gpointer iface_data)
53 {
54 }
55 
56 /**
57  * Provides a mechanism to inspect the API & documentation of programs and libraries
58  */
59 static GType
valadoc_doclet_get_type_once(void)60 valadoc_doclet_get_type_once (void)
61 {
62 	static const GTypeInfo g_define_type_info = { sizeof (ValadocDocletIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_doclet_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
63 	GType valadoc_doclet_type_id;
64 	valadoc_doclet_type_id = g_type_register_static (G_TYPE_INTERFACE, "ValadocDoclet", &g_define_type_info, 0);
65 	g_type_interface_add_prerequisite (valadoc_doclet_type_id, G_TYPE_OBJECT);
66 	return valadoc_doclet_type_id;
67 }
68 
69 GType
valadoc_doclet_get_type(void)70 valadoc_doclet_get_type (void)
71 {
72 	static volatile gsize valadoc_doclet_type_id__volatile = 0;
73 	if (g_once_init_enter (&valadoc_doclet_type_id__volatile)) {
74 		GType valadoc_doclet_type_id;
75 		valadoc_doclet_type_id = valadoc_doclet_get_type_once ();
76 		g_once_init_leave (&valadoc_doclet_type_id__volatile, valadoc_doclet_type_id);
77 	}
78 	return valadoc_doclet_type_id__volatile;
79 }
80 
81