3
* Copyright (C) 2006 Jürg Billeter
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
* Jürg Billeter <j@bitron.ch>
23
#ifndef __VALAENUM_H__
24
#define __VALAENUM_H__
27
#include <glib-object.h>
30
#include <vala/valadatatype.h>
31
#include <vala/valacodenode.h>
36
#define VALA_TYPE_ENUM (vala_enum_get_type ())
37
#define VALA_ENUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_ENUM, ValaEnum))
38
#define VALA_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_ENUM, ValaEnumClass))
39
#define VALA_IS_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_ENUM))
40
#define VALA_IS_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_ENUM))
41
#define VALA_ENUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_ENUM, ValaEnumClass))
43
typedef struct _ValaEnumPrivate ValaEnumPrivate;
46
* Represents an enum declaration in the source code.
50
ValaEnumPrivate * priv;
52
struct _ValaEnumClass {
53
ValaDataTypeClass parent;
56
ValaEnum* vala_enum_new (char* _name, ValaSourceReference* source);
57
void vala_enum_add_value (ValaEnum* self, ValaEnumValue* value);
58
char* vala_enum_get_cprefix (ValaEnum* self);
59
void vala_enum_set_cprefix (ValaEnum* self, char* cprefix);
60
void vala_enum_process_attributes (ValaEnum* self);
61
GType vala_enum_get_type ();