net.sf.antcontrib.cpptasks.openwatcom

Class OpenWatcomCompiler

Implemented Interfaces:
Cloneable, Compiler, Processor
Known Direct Subclasses:
OpenWatcomCCompiler, OpenWatcomFortranCompiler

public abstract class OpenWatcomCompiler
extends CommandLineCompiler

An abstract base class for the OpenWatcom C and Fortran compilers.
Author:
Curt Arnold

Field Summary

Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID

Constructor Summary

OpenWatcomCompiler(String command, String identifierArg, String[] sourceExtensions, String[] headerExtensions, boolean newEnvironment, Environment env)
Constructor.

Method Summary

protected void
addImpliedArgs(Vector args, boolean debug, boolean multithreaded, boolean exceptions, LinkType linkType, Boolean rtti, OptimizationEnum optimization)
Add implied arguments.
protected void
addWarningSwitch(Vector args, int level)
Add warning switch.
Processor
changeEnvironment(boolean newEnvironment, Environment env)
Change enviroment.
protected void
getDefineSwitch(StringBuffer buffer, String define, String value)
Get define switch.
protected File[]
getEnvironmentIncludePath()
Get include path from environment.
protected String
getIncludeDirSwitch(String includeDir)
Get include directory switch.
int
getMaximumCommandLength()
Get maximum command line length.
protected void
getUndefineSwitch(StringBuffer buffer, String define)
Get undefine switch.

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler

addImpliedArgs, addIncludes, addWarningSwitch, buildDefineArguments, compile, createConfiguration, getArgumentCountPerInputFile, getCommand, getDefineSwitch, getEnvironmentIncludePath, getIdentifier, getIncludeDirSwitch, getInputFileArgument, getLibtool, getLibtoolCompiler, getMaximumCommandLength, getMaximumInputFilesPerCommand, getTotalArgumentLengthForInputFile, getUndefineSwitch, runCommand, setCommand

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractCompiler

canParse, createConfiguration, createConfiguration, createParser, getBaseOutputName, getOutputFileNames, parseIncludes, resolveInclude

Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor

bid, changeEnvironment, clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString

Constructor Details

OpenWatcomCompiler

protected OpenWatcomCompiler(String command,
                             String identifierArg,
                             String[] sourceExtensions,
                             String[] headerExtensions,
                             boolean newEnvironment,
                             Environment env)
Constructor.
Parameters:
command - String command
identifierArg - String identifier
sourceExtensions - String[] source extension
headerExtensions - String[] header extension
newEnvironment - boolean use new enviroment
env - Environment environment

Method Details

addImpliedArgs

protected final void addImpliedArgs(Vector args,
                                    boolean debug,
                                    boolean multithreaded,
                                    boolean exceptions,
                                    LinkType linkType,
                                    Boolean rtti,
                                    OptimizationEnum optimization)
Add implied arguments.
Overrides:
addImpliedArgs in interface CommandLineCompiler
Parameters:
args - Vector command line arguments
debug - boolean is debug
multithreaded - boolean multithreaderd
exceptions - boolean support exceptions
linkType - LinkType link type
rtti - Boolean run time type information
optimization - OptimizationEnum

addWarningSwitch

protected final void addWarningSwitch(Vector args,
                                      int level)
Add warning switch.
Overrides:
addWarningSwitch in interface CommandLineCompiler
Parameters:
args - Vector command line arguments
level - int warning level

changeEnvironment

public final Processor changeEnvironment(boolean newEnvironment,
                                         Environment env)
Change enviroment.
Specified by:
changeEnvironment in interface Processor
Overrides:
changeEnvironment in interface AbstractProcessor
Parameters:
newEnvironment - boolean use new enviroment
env - Environment environment
Returns:
Processor modified processor

getDefineSwitch

protected final void getDefineSwitch(StringBuffer buffer,
                                     String define,
                                     String value)
Get define switch.
Overrides:
getDefineSwitch in interface CommandLineCompiler
Parameters:
buffer - StringBuffer buffer
define - String preprocessor macro
value - String value, may be null.

getEnvironmentIncludePath

protected final File[] getEnvironmentIncludePath()
Get include path from environment.
Overrides:
getEnvironmentIncludePath in interface CommandLineCompiler
Returns:
File[]

getIncludeDirSwitch

protected final String getIncludeDirSwitch(String includeDir)
Get include directory switch.
Overrides:
getIncludeDirSwitch in interface CommandLineCompiler
Parameters:
includeDir - String include directory
Returns:
String command line argument

getMaximumCommandLength

public final int getMaximumCommandLength()
Get maximum command line length.
Overrides:
getMaximumCommandLength in interface CommandLineCompiler
Returns:
int maximum command line length

getUndefineSwitch

protected final void getUndefineSwitch(StringBuffer buffer,
                                       String define)
Get undefine switch.
Overrides:
getUndefineSwitch in interface CommandLineCompiler
Parameters:
buffer - StringBuffer argument destination
define - String preprocessor macro

Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.