File: valaemptystatement.c

package info (click to toggle)
vala 0.42.5-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 41,584 kB
  • sloc: ansic: 557,663; sh: 4,808; xml: 3,135; makefile: 2,864; yacc: 1,218; lex: 374; perl: 106
file content (130 lines) | stat: -rw-r--r-- 4,485 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/* valaemptystatement.c generated by valac, the Vala compiler
 * generated from valaemptystatement.vala, do not modify */

/* valaemptystatement.vala
 *
 * Copyright (C) 2006-2010  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>
 */


#include <glib.h>
#include <glib-object.h>
#include "vala.h"



static gpointer vala_empty_statement_parent_class = NULL;
static ValaStatementIface * vala_empty_statement_vala_statement_parent_iface = NULL;

static void vala_empty_statement_real_accept (ValaCodeNode* base,
                                       ValaCodeVisitor* visitor);
static void vala_empty_statement_real_emit (ValaCodeNode* base,
                                     ValaCodeGenerator* codegen);


/**
 * Creates a new empty statement.
 *
 * @param source reference to source code
 * @return       newly created empty statement
 */
ValaEmptyStatement*
vala_empty_statement_construct (GType object_type,
                                ValaSourceReference* source)
{
	ValaEmptyStatement* self = NULL;
	g_return_val_if_fail (source != NULL, NULL);
	self = (ValaEmptyStatement*) vala_code_node_construct (object_type);
	vala_code_node_set_source_reference ((ValaCodeNode*) self, source);
	return self;
}


ValaEmptyStatement*
vala_empty_statement_new (ValaSourceReference* source)
{
	return vala_empty_statement_construct (VALA_TYPE_EMPTY_STATEMENT, source);
}


static void
vala_empty_statement_real_accept (ValaCodeNode* base,
                                  ValaCodeVisitor* visitor)
{
	ValaEmptyStatement * self;
	self = (ValaEmptyStatement*) base;
	g_return_if_fail (visitor != NULL);
	vala_code_visitor_visit_empty_statement (visitor, self);
}


static void
vala_empty_statement_real_emit (ValaCodeNode* base,
                                ValaCodeGenerator* codegen)
{
	ValaEmptyStatement * self;
	self = (ValaEmptyStatement*) base;
	g_return_if_fail (codegen != NULL);
	vala_code_visitor_visit_empty_statement ((ValaCodeVisitor*) codegen, self);
}


static void
vala_empty_statement_class_init (ValaEmptyStatementClass * klass)
{
	vala_empty_statement_parent_class = g_type_class_peek_parent (klass);
	((ValaCodeNodeClass *) klass)->accept = (void (*) (ValaCodeNode*, ValaCodeVisitor*)) vala_empty_statement_real_accept;
	((ValaCodeNodeClass *) klass)->emit = (void (*) (ValaCodeNode*, ValaCodeGenerator*)) vala_empty_statement_real_emit;
}


static void
vala_empty_statement_vala_statement_interface_init (ValaStatementIface * iface)
{
	vala_empty_statement_vala_statement_parent_iface = g_type_interface_peek_parent (iface);
}


static void
vala_empty_statement_instance_init (ValaEmptyStatement * self)
{
}


/**
 * An empty statement.
 */
GType
vala_empty_statement_get_type (void)
{
	static volatile gsize vala_empty_statement_type_id__volatile = 0;
	if (g_once_init_enter (&vala_empty_statement_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValaEmptyStatementClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_empty_statement_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaEmptyStatement), 0, (GInstanceInitFunc) vala_empty_statement_instance_init, NULL };
		static const GInterfaceInfo vala_statement_info = { (GInterfaceInitFunc) vala_empty_statement_vala_statement_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType vala_empty_statement_type_id;
		vala_empty_statement_type_id = g_type_register_static (VALA_TYPE_CODE_NODE, "ValaEmptyStatement", &g_define_type_info, 0);
		g_type_add_interface_static (vala_empty_statement_type_id, VALA_TYPE_STATEMENT, &vala_statement_info);
		g_once_init_leave (&vala_empty_statement_type_id__volatile, vala_empty_statement_type_id);
	}
	return vala_empty_statement_type_id__volatile;
}