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 AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCompiler(String[] sourceExtensions, String[] headerExtensions, String outputSuffix) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanChecks file name to see if parse should be attempted Default implementation returns false for files with extensions '.dll', 'tlb', '.res'protected abstract CompilerConfigurationcreateConfiguration(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 ParsercreateParser(File sourceFile) protected StringgetBaseOutputName(String inputFile) String[]getOutputFileNames(String inputFile, VersionInfo versionInfo) Output file name (no path components) corresponding to source filefinal DependencyInfoparseIncludes(CCTask task, File source, File[] includePath, File[] sysIncludePath, File[] envIncludePath, File baseDir, String includePathIdentifier) Returns dependency info for the specified source fileprotected booleanresolveInclude(String includeName, File[] includePath, Vector onThisPath) Methods inherited from class AbstractProcessor
bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toStringMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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:ProcessorReturns the compiler configuration foror element. - Specified by:
createConfigurationin 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:ProcessorOutput file name (no path components) corresponding to source file- Specified by:
getOutputFileNamesin 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
-