net.sf.antcontrib.cpptasks.compiler
Class CommandLineCompilerConfiguration

java.lang.Object
  |
  +--net.sf.antcontrib.cpptasks.compiler.CommandLineCompilerConfiguration

public final class CommandLineCompilerConfiguration
extends java.lang.Object
implements CompilerConfiguration

A configuration for a C++ compiler

Author:
Curt Arnold

Constructor Summary
CommandLineCompilerConfiguration(CommandLineCompilerConfiguration base, java.lang.String[] additionalArgs, java.lang.String[] exceptFiles, boolean isPrecompileHeaderGeneration)
           
CommandLineCompilerConfiguration(CommandLineCompiler compiler, java.lang.String identifier, java.io.File[] includePath, java.io.File[] sysIncludePath, java.io.File[] envIncludePath, java.lang.String includePathIdentifier, java.lang.String[] args, boolean rebuild, java.lang.String[] endArgs)
           
 
Method Summary
 int bid(java.lang.String inputFile)
          An indication of how much this compiler would like to process this file
 void compile(CCTask task, java.io.File outputDir, java.lang.String[] sourceFiles, boolean relentless, ProgressMonitor monitor)
           
 CompilerConfiguration[] createPrecompileConfigurations(java.io.File prototype, java.lang.String[] nonPrecompiledFiles)
          This method may be used to get two distinct compiler configurations, one for compiling the specified file and producing a precompiled header file, and a second for compiling other files using the precompiled header file.
 java.lang.String getIdentifier()
          Returns a string representation of this configuration.
 java.lang.String getIncludePathIdentifier()
          Returns an digest for the include path for the configuration.
 java.lang.String getOutputFileName(java.lang.String inputFile)
          Output file name (no path components) corresponding to source file
 boolean getRebuild()
          If true, all files using this configuration should be rebuilt and any existing output files should be ignored
 boolean isPrecompileGeneration()
           
 DependencyInfo parseIncludes(CCTask task, java.io.File baseDir, java.io.File source)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandLineCompilerConfiguration

public CommandLineCompilerConfiguration(CommandLineCompiler compiler,
                                        java.lang.String identifier,
                                        java.io.File[] includePath,
                                        java.io.File[] sysIncludePath,
                                        java.io.File[] envIncludePath,
                                        java.lang.String includePathIdentifier,
                                        java.lang.String[] args,
                                        boolean rebuild,
                                        java.lang.String[] endArgs)

CommandLineCompilerConfiguration

public CommandLineCompilerConfiguration(CommandLineCompilerConfiguration base,
                                        java.lang.String[] additionalArgs,
                                        java.lang.String[] exceptFiles,
                                        boolean isPrecompileHeaderGeneration)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getIdentifier

public java.lang.String getIdentifier()
Returns a string representation of this configuration. Should be canonical so that equivalent configurations will have equivalent string representations

getOutputFileName

public java.lang.String getOutputFileName(java.lang.String inputFile)
Description copied from interface: ProcessorConfiguration
Output file name (no path components) corresponding to source file
Tags copied from interface: ProcessorConfiguration
Parameters:
inputFile - input file
Returns:
output file name or null if no output file or name not determined by input file

bid

public int bid(java.lang.String inputFile)
Description copied from interface: ProcessorConfiguration
An indication of how much this compiler would like to process this file
Tags copied from interface: ProcessorConfiguration
Returns:
0 is no interest to process, 100 is strong interest to process

compile

public void compile(CCTask task,
                    java.io.File outputDir,
                    java.lang.String[] sourceFiles,
                    boolean relentless,
                    ProgressMonitor monitor)
             throws org.apache.tools.ant.BuildException
Specified by:
compile in interface CompilerConfiguration

getIncludePathIdentifier

public java.lang.String getIncludePathIdentifier()
Description copied from interface: CompilerConfiguration
Returns an digest for the include path for the configuration. This is used to determine if cached dependency information is invalid because the include paths have changed
Specified by:
getIncludePathIdentifier in interface CompilerConfiguration

getRebuild

public boolean getRebuild()
Description copied from interface: ProcessorConfiguration
If true, all files using this configuration should be rebuilt and any existing output files should be ignored

parseIncludes

public DependencyInfo parseIncludes(CCTask task,
                                    java.io.File baseDir,
                                    java.io.File source)
Specified by:
parseIncludes in interface CompilerConfiguration

createPrecompileConfigurations

public CompilerConfiguration[] createPrecompileConfigurations(java.io.File prototype,
                                                              java.lang.String[] nonPrecompiledFiles)
This method may be used to get two distinct compiler configurations, one for compiling the specified file and producing a precompiled header file, and a second for compiling other files using the precompiled header file. The last (preferrably only) include directive in the prototype file will be used to mark the boundary between pre-compiled and normally compiled headers.
Specified by:
createPrecompileConfigurations in interface CompilerConfiguration
Parameters:
prototype - A source file (for example, stdafx.cpp) that is used to build the precompiled header file.

isPrecompileGeneration

public boolean isPrecompileGeneration()
Specified by:
isPrecompileGeneration in interface CompilerConfiguration


Copyright © 2001-2002 Ant-Contrib project. All Rights Reserved.