1 /***
2 * Cecilia ADL Compiler
3 * Copyright (C) 2006-2007 STMicroelectronics
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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Contact: fractal@objectweb.org
20 *
21 * Author:Ali Erdem Ozcan, Lionel Debroux
22 */
23
24 package org.objectweb.fractal.cecilia.adl.idl;
25
26 import org.objectweb.fractal.cecilia.adl.idl.ast.Field;
27 import org.objectweb.fractal.cecilia.adl.idl.ast.UnionDefinition;
28
29 /**
30 * The meta builder interface for Union writers.
31 */
32 public interface UnionVisitor extends IDLVisitor {
33
34 /**
35 * Builds the header part for an given union definition.
36 *
37 * @param union the union definition.
38 * @throws Exception if any error occurs.
39 */
40 void enterUnion(UnionDefinition union) throws Exception;
41
42 /**
43 * Builds the footer part for an given union definition.
44 *
45 * @param union the union definition.
46 * @throws Exception if any error occurs.
47 */
48 void leaveUnion(UnionDefinition union) throws Exception;
49
50 /**
51 * Visits a field definition.
52 *
53 * @param field the field definition to be used.
54 * @throws Exception if any error occurs.
55 */
56 void visitField(Field field) throws Exception;
57
58 }