1 /* valacontinuestatement.c generated by valac, the Vala compiler
2  * generated from valacontinuestatement.vala, do not modify */
3 
4 /* valacontinuestatement.vala
5  *
6  * Copyright (C) 2006-2010  Jürg Billeter
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  * 	Jürg Billeter <j@bitron.ch>
24  */
25 
26 #include "vala.h"
27 #include <glib.h>
28 
29 static gpointer vala_continue_statement_parent_class = NULL;
30 static ValaStatementIface * vala_continue_statement_vala_statement_parent_iface = NULL;
31 
32 static void vala_continue_statement_real_accept (ValaCodeNode* base,
33                                           ValaCodeVisitor* visitor);
34 static void vala_continue_statement_real_emit (ValaCodeNode* base,
35                                         ValaCodeGenerator* codegen);
36 static GType vala_continue_statement_get_type_once (void);
37 
38 /**
39  * Creates a new continue statement.
40  *
41  * @param source reference to source code
42  * @return       newly created continue statement
43  */
44 ValaContinueStatement*
vala_continue_statement_construct(GType object_type,ValaSourceReference * source)45 vala_continue_statement_construct (GType object_type,
46                                    ValaSourceReference* source)
47 {
48 	ValaContinueStatement* self = NULL;
49 	self = (ValaContinueStatement*) vala_code_node_construct (object_type);
50 	vala_code_node_set_source_reference ((ValaCodeNode*) self, source);
51 	return self;
52 }
53 
54 ValaContinueStatement*
vala_continue_statement_new(ValaSourceReference * source)55 vala_continue_statement_new (ValaSourceReference* source)
56 {
57 	return vala_continue_statement_construct (VALA_TYPE_CONTINUE_STATEMENT, source);
58 }
59 
60 static void
vala_continue_statement_real_accept(ValaCodeNode * base,ValaCodeVisitor * visitor)61 vala_continue_statement_real_accept (ValaCodeNode* base,
62                                      ValaCodeVisitor* visitor)
63 {
64 	ValaContinueStatement * self;
65 	self = (ValaContinueStatement*) base;
66 	g_return_if_fail (visitor != NULL);
67 	vala_code_visitor_visit_continue_statement (visitor, self);
68 }
69 
70 static void
vala_continue_statement_real_emit(ValaCodeNode * base,ValaCodeGenerator * codegen)71 vala_continue_statement_real_emit (ValaCodeNode* base,
72                                    ValaCodeGenerator* codegen)
73 {
74 	ValaContinueStatement * self;
75 	self = (ValaContinueStatement*) base;
76 	g_return_if_fail (codegen != NULL);
77 	vala_code_visitor_visit_continue_statement ((ValaCodeVisitor*) codegen, self);
78 }
79 
80 static void
vala_continue_statement_class_init(ValaContinueStatementClass * klass,gpointer klass_data)81 vala_continue_statement_class_init (ValaContinueStatementClass * klass,
82                                     gpointer klass_data)
83 {
84 	vala_continue_statement_parent_class = g_type_class_peek_parent (klass);
85 	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_continue_statement_real_accept;
86 	((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_continue_statement_real_emit;
87 }
88 
89 static void
vala_continue_statement_vala_statement_interface_init(ValaStatementIface * iface,gpointer iface_data)90 vala_continue_statement_vala_statement_interface_init (ValaStatementIface * iface,
91                                                        gpointer iface_data)
92 {
93 	vala_continue_statement_vala_statement_parent_iface = g_type_interface_peek_parent (iface);
94 }
95 
96 static void
vala_continue_statement_instance_init(ValaContinueStatement * self,gpointer klass)97 vala_continue_statement_instance_init (ValaContinueStatement * self,
98                                        gpointer klass)
99 {
100 }
101 
102 /**
103  * Represents a continue statement in the source code.
104  */
105 static GType
vala_continue_statement_get_type_once(void)106 vala_continue_statement_get_type_once (void)
107 {
108 	static const GTypeInfo g_define_type_info = { sizeof (ValaContinueStatementClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_continue_statement_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaContinueStatement), 0, (GInstanceInitFunc) vala_continue_statement_instance_init, NULL };
109 	static const GInterfaceInfo vala_statement_info = { (GInterfaceInitFunc) vala_continue_statement_vala_statement_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
110 	GType vala_continue_statement_type_id;
111 	vala_continue_statement_type_id = g_type_register_static (VALA_TYPE_CODE_NODE, "ValaContinueStatement", &g_define_type_info, 0);
112 	g_type_add_interface_static (vala_continue_statement_type_id, VALA_TYPE_STATEMENT, &vala_statement_info);
113 	return vala_continue_statement_type_id;
114 }
115 
116 GType
vala_continue_statement_get_type(void)117 vala_continue_statement_get_type (void)
118 {
119 	static volatile gsize vala_continue_statement_type_id__volatile = 0;
120 	if (g_once_init_enter (&vala_continue_statement_type_id__volatile)) {
121 		GType vala_continue_statement_type_id;
122 		vala_continue_statement_type_id = vala_continue_statement_get_type_once ();
123 		g_once_init_leave (&vala_continue_statement_type_id__volatile, vala_continue_statement_type_id);
124 	}
125 	return vala_continue_statement_type_id__volatile;
126 }
127 
128