KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > util > cpp > api > Preprocessor


1 /*====================================================================
2
3 ObjectWeb Util Preprocessor Package.
4 Copyright (C) 2004 INRIA & USTL - LIFL - GOAL
5 Contact: architecture@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): Philippe Merle.
23 Contributor(s): ______________________________________.
24
25 --------------------------------------------------------------------
26 $Id: Preprocessor.java,v 1.1 2004/02/05 20:29:57 rouvoy Exp $
27 ====================================================================*/

28
29 package org.objectweb.util.cpp.api;
30
31 import java.util.Map JavaDoc;
32
33 import org.objectweb.util.cmdline.api.ConsoleHolder;
34
35 /**
36  * This defines a simple interface to interact with preprocessors.
37  *
38  * This provides the following properties:
39  *
40  * - GenerateLineInformation: Indicates if #line information should be generated.
41  *
42  * - IncludeDirectory: The list of directories where included files
43  * are searched.
44  *
45  * - Macro: The list of defined macros.
46  *
47  * This provides two preprocess operations.
48  *
49  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
50  * @version 0.1
51  */

52 public interface Preprocessor
53          extends PreprocessorOperations,
54                  ConsoleHolder
55 {
56     /**
57      * Obtains the GenerateLineInformation property.
58      *
59      * @return The GenerateLineInformation property.
60      */

61     public boolean
62     getGenerateLineInformation();
63
64     /**
65      * Sets the GenerateLineInformation property.
66      *
67      * @param b The GenerateLineInformation property.
68      */

69     public void
70     setGenerateLineInformation(boolean b);
71
72     /**
73      * Adds a directory to the list of include directories.
74      *
75      * @param directoru The directory to add.
76      */

77     public void
78     addIncludeDirectory(String JavaDoc directory);
79
80     /**
81      * Obtains the list of include directories.
82      *
83      * @return The list of include directories.
84      */

85     public String JavaDoc[]
86     getIncludeDirectory();
87
88     /**
89      * Sets the list of include directories.
90      *
91      * @param directories The list of include directories.
92      */

93     public void
94     setIncludeDirectory(String JavaDoc[] directories);
95
96     /**
97      * Adds a macro (name - 1) to the list of declared macros.
98      *
99      * @param name The name of the macro to add.
100      */

101     public void
102     addMacro(String JavaDoc name);
103
104     /**
105      * Adds a macro (name - value) to the list of declared macros.
106      *
107      * @param name The name of the macro to add.
108      * @param value The value of the macro to add.
109      */

110     public void
111     addMacro(String JavaDoc name,
112              String JavaDoc value);
113
114     /**
115      * Removes a macro (name - value) from the list of declared macros.
116      *
117      * @param name The name of the macro to remove.
118      */

119     public void
120     removeMacro(String JavaDoc name);
121
122     /**
123      * Obtains the list of declared macros.
124      *
125      * @return The list of declared macros.
126      */

127     public Map JavaDoc
128     getMacro();
129
130     /**
131      * Sets the list of declared macros.
132      *
133      * @param macros The list of declared macros.
134      */

135     public void
136     setMacro(Map JavaDoc macros);
137 }
138
Popular Tags