1/* visitor.vala
2 *
3 * Copyright (C) 2008-2009 Florian Brosch, Didier Villevalois
4 *
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.1 of the License, or (at your option) any later version.
9 *
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.
14 *
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
18 *
19 * Author:
20 * 	Didier 'Ptitjes Villevalois <ptitjes@free.fr>
21 */
22
23
24/**
25 * Abstract visitor for traversing API.
26 */
27public abstract class Valadoc.Api.Visitor : GLib.Object {
28	/**
29	 * Visit operation called for api trees.
30	 *
31	 * @param item a tree
32	 */
33	public virtual void visit_tree (Tree item) {
34	}
35
36	/**
37	 * Visit operation called for packages like gir-files and vapi-files.
38	 *
39	 * @param item a package
40	 */
41	public virtual void visit_package (Package item) {
42	}
43
44	/**
45	 * Visit operation called for namespaces
46	 *
47	 * @param item a namespace
48	 */
49	public virtual void visit_namespace (Namespace item) {
50	}
51
52	/**
53	 * Visit operation called for interfaces.
54	 *
55	 * @param item a interface
56	 */
57	public virtual void visit_interface (Interface item) {
58	}
59
60	/**
61	 * Visit operation called for classes.
62	 *
63	 * @param item a class
64	 */
65	public virtual void visit_class (Class item) {
66	}
67
68	/**
69	 * Visit operation called for structs.
70	 *
71	 * @param item a struct
72	 */
73	public virtual void visit_struct (Struct item) {
74	}
75
76	/**
77	 * Visit operation called for properties.
78	 *
79	 * @param item a property
80	 */
81	public virtual void visit_property (Property item) {
82	}
83
84	/**
85	 * Visit operation called for fields.
86	 *
87	 * @param item a field
88	 */
89	public virtual void visit_field (Field item) {
90	}
91
92	/**
93	 * Visit operation called for constants.
94	 *
95	 * @param item a constant
96	 */
97	public virtual void visit_constant (Constant item) {
98	}
99
100	/**
101	 * Visit operation called for delegates.
102	 *
103	 * @param item a delegate
104	 */
105	public virtual void visit_delegate (Delegate item) {
106	}
107
108	/**
109	 * Visit operation called for signals.
110	 *
111	 * @param item a signal
112	 */
113	public virtual void visit_signal (Signal item) {
114	}
115
116	/**
117	 * Visit operation called for methods.
118	 *
119	 * @param item a method
120	 */
121	public virtual void visit_method (Method item) {
122	}
123
124	/**
125	 * Visit operation called for type parameters.
126	 *
127	 * @param item a type parameter
128	 */
129	public virtual void visit_type_parameter (TypeParameter item) {
130	}
131
132	/**
133	 * Visit operation called for parameters.
134	 *
135	 * @param item a parameter
136	 */
137	public virtual void visit_formal_parameter (Parameter item) {
138	}
139
140	/**
141	 * Visit operation called for error domains.
142	 *
143	 * @param item a error domain
144	 */
145	public virtual void visit_error_domain (ErrorDomain item) {
146	}
147
148	/**
149	 * Visit operation called for error codes.
150	 *
151	 * @param item a error code
152	 */
153	public virtual void visit_error_code (ErrorCode item) {
154	}
155
156	/**
157	 * Visit operation called for enums.
158	 *
159	 * @param item a enum
160	 */
161	public virtual void visit_enum (Enum item) {
162	}
163
164	/**
165	 * Visit operation called for enum values.
166	 *
167	 * @param item a enum value
168	 */
169	public virtual void visit_enum_value (EnumValue item) {
170	}
171}
172