KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > generator > translator > ast2idl > api > AST_IDLTranslator


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Mathieu Vadet.
23 Contributor(s): Christophe Demarey.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.generator.translator.ast2idl.api;
28
29 import org.objectweb.openccm.ast.api.Declaration;
30
31 /**
32  * Utility interface to translate IDL types in string format.
33  *
34  * @author <a HREF="mailto:Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
35  * @author <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
36  *
37  * @version 0.5
38  */

39
40 public interface AST_IDLTranslator
41 {
42     /**
43      * Translate a type into its idl format.
44      *
45      * @param typeref - The type reference to translate.
46      *
47      * @return The resulting string.
48      **/

49     public String JavaDoc
50     toIDL(org.objectweb.openccm.ast.api.TypeRef typeref);
51
52     /**
53      * Add postfix to the IDL name if typeref is an array.
54      *
55      * @param typeref - The array to translate.
56      *
57      * @return The resulting string.
58      **/

59     public String JavaDoc
60     toIDLPostfix(org.objectweb.openccm.ast.api.TypeRef typeref);
61
62     /**
63      * Get the string value of an Any.
64      *
65      * @param anyvalue - The Any to translate.
66      * @param typeref - The value's type.
67      *
68      * @return The resulting string.
69      **/

70     public String JavaDoc
71     toString(org.objectweb.openccm.ast.api.AnyValue anyvalue,
72              org.objectweb.openccm.ast.api.TypeRef typeref);
73
74     /**
75      * Check if id is an idl keyword.
76      *
77      * @param id - The string to check
78      *
79      * @return A valid string.
80      */

81     public String JavaDoc
82     checkKeywords(String JavaDoc id);
83
84     /**
85      * Get a valid absolute name from a declaration,
86      * i.e. check keywords.
87      *
88      * @param decl - The declaration to get the name.
89      *
90      * @return A valid absolute name.
91      */

92     public String JavaDoc
93     getAbsoluteName(Declaration decl);
94 }
95
Popular Tags