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