Class AbstractCompiler
java.lang.Object
net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
- Direct Known Subclasses:
CommandLineCompiler
An abstract compiler implementation.
- Author:
- Adam Murdoch, Curt Arnold
-
Field Summary
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractCompiler
(String[] sourceExtensions, String[] headerExtensions, String outputSuffix) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks file name to see if parse should be attempted Default implementation returns false for files with extensions '.dll', 'tlb', '.res'protected abstract CompilerConfiguration
createConfiguration
(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, CompilerDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) createConfiguration
(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, ProcessorDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) Returns the compiler configuration foror element. protected abstract Parser
createParser
(File sourceFile) protected String
getBaseOutputName
(String inputFile) String[]
getOutputFileNames
(String inputFile, VersionInfo versionInfo) Output file name (no path components) corresponding to source filefinal DependencyInfo
parseIncludes
(CCTask task, File source, File[] includePath, File[] sysIncludePath, File[] envIncludePath, File baseDir, String includePathIdentifier) Returns dependency info for the specified source fileprotected boolean
resolveInclude
(String includeName, File[] includePath, Vector onThisPath) Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.antcontrib.cpptasks.compiler.Processor
bid, changeEnvironment, getIdentifier, getLinker
-
Constructor Details
-
AbstractCompiler
-
-
Method Details
-
canParse
Checks file name to see if parse should be attempted Default implementation returns false for files with extensions '.dll', 'tlb', '.res' -
createConfiguration
protected abstract CompilerConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, CompilerDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) -
createConfiguration
public ProcessorConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, ProcessorDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) Description copied from interface:Processor
Returns the compiler configuration foror element. - Specified by:
createConfiguration
in interfaceProcessor
- Parameters:
baseConfigs
- When specificConfig corresponds to aor linker element, defaultProvider will be a zero to two element array. If there is an extends attribute, the first element will be the referenced ProcessorDef, unless inherit = false, the last element will be the containing element specificConfig
- Aor element. - Returns:
- resulting configuration
-
createParser
-
getBaseOutputName
-
getOutputFileNames
Description copied from interface:Processor
Output file name (no path components) corresponding to source file- Specified by:
getOutputFileNames
in interfaceProcessor
- Parameters:
inputFile
- input file- Returns:
- output file name or null if no output file or name not determined by input file
-
parseIncludes
public final DependencyInfo parseIncludes(CCTask task, File source, File[] includePath, File[] sysIncludePath, File[] envIncludePath, File baseDir, String includePathIdentifier) Returns dependency info for the specified source file- Parameters:
task
- task for any diagnostic outputsource
- file to be parsedincludePath
- include path to be used to resolve included filessysIncludePath
- sysinclude path from build file, files resolved using sysInclude path will not participate in dependency analysisenvIncludePath
- include path from environment variable, files resolved with envIncludePath will not participate in dependency analysisbaseDir
- used to produce relative paths in DependencyInfoincludePathIdentifier
- used to distinguish DependencyInfo's from different include path settings
-
resolveInclude
-