View Javadoc

1   /*
2    * #%L
3    * Native ARchive plugin for Maven
4    * %%
5    * Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6    * %%
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   * 
11   * http://www.apache.org/licenses/LICENSE-2.0
12   * 
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * #L%
19   */
20  package com.github.maven_nar.cpptasks.compiler;
21  
22  import com.github.maven_nar.cpptasks.ProcessorParam;
23  import com.github.maven_nar.cpptasks.VersionInfo;
24  
25  /**
26   * A configuration for a C++ compiler, linker or other processor
27   *
28   * @author Curt Arnold
29   */
30  public interface ProcessorConfiguration {
31    /**
32     * An indication of how much this compiler would like to process this file
33     * 
34     * @return 0 is no interest to process, 100 is strong interest to process
35     */
36    int bid(String filename);
37  
38    /**
39     * Returns a string representation of this configuration. Should be
40     * canonical so that equivalent configurations will have equivalent string
41     * representations
42     */
43    String getIdentifier();
44  
45    /**
46     * Output file name (no path components) corresponding to source file
47     * 
48     * @param inputFile
49     *          input file
50     * @return output file names or zero-length array if no output file or name
51     *         not
52     *         determined by input file
53     */
54    String[] getOutputFileNames(String inputFile, VersionInfo versionInfo);
55  
56    ProcessorParam[] getParams();
57  
58    /**
59     * If true, all files using this configuration should be rebuilt and any
60     * existing output files should be ignored
61     */
62    boolean getRebuild();
63  }