]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/compiler/Processor.java
Restructuring for better separation of Tool packages.
[mirror_edk2.git] / Tools / Java / Source / Cpptasks / net / sf / antcontrib / cpptasks / compiler / Processor.java
1 /*
2 *
3 * Copyright 2002-2004 The Ant-Contrib project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package net.sf.antcontrib.cpptasks.compiler;
18 import net.sf.antcontrib.cpptasks.CCTask;
19 import net.sf.antcontrib.cpptasks.ProcessorDef;
20 import net.sf.antcontrib.cpptasks.TargetDef;
21 import org.apache.tools.ant.types.Environment;
22 /**
23 * A processor. Base interface for Compiler and Linker
24 *
25 * @author Curt Arnold
26 */
27 public interface Processor {
28 /**
29 * Returns a bid indicating the desire of this compiler to process the
30 * file.
31 *
32 * @param inputFile
33 * input file
34 * @return 0 = no interest, 100 = high interest
35 */
36 int bid(String inputFile);
37 Processor changeEnvironment(boolean newEnvironment, Environment env);
38 /**
39 * Returns the compiler configuration for <cc>or <compiler>element.
40 *
41 * @param defaultProviders
42 * When specificConfig corresponds to a <compiler>or linker
43 * element, defaultProvider will be a zero to two element array.
44 * If there is an extends attribute, the first element will be
45 * the referenced ProcessorDef, unless inherit = false, the last
46 * element will be the containing <cc>element
47 * @param specificConfig
48 * A <cc>or <compiler>element.
49 * @return resulting configuration
50 */
51 ProcessorConfiguration createConfiguration(CCTask task, LinkType linkType,
52 ProcessorDef[] defaultProviders, ProcessorDef specificConfig,
53 TargetDef targetPlatform);
54 /**
55 * Retrieve an identifier that identifies the specific version of the
56 * compiler. Compilers with the same identifier should produce the same
57 * output files for the same input files and command line switches.
58 */
59 String getIdentifier();
60 /**
61 * Gets the linker that is associated with this processors
62 */
63 Linker getLinker(LinkType type);
64 /**
65 * Output file name (no path components) corresponding to source file
66 *
67 * @param inputFile
68 * input file
69 * @return output file name or null if no output file or name not
70 * determined by input file
71 */
72 String getOutputFileName(String inputFile);
73 }