net.sf.antcontrib.cpptasks.openwatcom
Class OpenWatcomCompiler

java.lang.Object
  extended by net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
      extended by net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
          extended by net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler
              extended by net.sf.antcontrib.cpptasks.openwatcom.OpenWatcomCompiler
All Implemented Interfaces:
java.lang.Cloneable, Compiler, Processor
Direct Known 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
protected OpenWatcomCompiler(java.lang.String command, java.lang.String identifierArg, java.lang.String[] sourceExtensions, java.lang.String[] headerExtensions, boolean newEnvironment, org.apache.tools.ant.types.Environment env)
          Constructor.
 
Method Summary
protected  void addImpliedArgs(java.util.Vector args, boolean debug, boolean multithreaded, boolean exceptions, LinkType linkType, java.lang.Boolean rtti, OptimizationEnum optimization)
          Add implied arguments.
protected  void addWarningSwitch(java.util.Vector args, int level)
          Add warning switch.
 Processor changeEnvironment(boolean newEnvironment, org.apache.tools.ant.types.Environment env)
          Change enviroment.
protected  void getDefineSwitch(java.lang.StringBuffer buffer, java.lang.String define, java.lang.String value)
          Get define switch.
protected  java.io.File[] getEnvironmentIncludePath()
          Get include path from environment.
protected  java.lang.String getIncludeDirSwitch(java.lang.String includeDir)
          Get include directory switch.
 int getMaximumCommandLength()
          Get maximum command line length.
protected  void getUndefineSwitch(java.lang.StringBuffer buffer, java.lang.String define)
          Get undefine switch.
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineCompiler
addIncludes, buildDefineArguments, compile, createConfiguration, getArgumentCountPerInputFile, getCommand, getIdentifier, getInputFileArgument, getLibtool, getLibtoolCompiler, getMaximumInputFilesPerCommand, getTotalArgumentLengthForInputFile, runCommand, setCommand
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
canParse, createConfiguration, createParser, getBaseOutputName, getOutputFileNames, parseIncludes, resolveInclude
 
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
bid, clone, getHeaderExtensions, 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, getLinker
 

Constructor Detail

OpenWatcomCompiler

protected OpenWatcomCompiler(java.lang.String command,
                             java.lang.String identifierArg,
                             java.lang.String[] sourceExtensions,
                             java.lang.String[] headerExtensions,
                             boolean newEnvironment,
                             org.apache.tools.ant.types.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 Detail

addImpliedArgs

protected final void addImpliedArgs(java.util.Vector args,
                                    boolean debug,
                                    boolean multithreaded,
                                    boolean exceptions,
                                    LinkType linkType,
                                    java.lang.Boolean rtti,
                                    OptimizationEnum optimization)
Add implied arguments.

Specified by:
addImpliedArgs in class 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(java.util.Vector args,
                                      int level)
Add warning switch.

Specified by:
addWarningSwitch in class CommandLineCompiler
Parameters:
args - Vector command line arguments
level - int warning level

changeEnvironment

public final Processor changeEnvironment(boolean newEnvironment,
                                         org.apache.tools.ant.types.Environment env)
Change enviroment.

Specified by:
changeEnvironment in interface Processor
Overrides:
changeEnvironment in class AbstractProcessor
Parameters:
newEnvironment - boolean use new enviroment
env - Environment environment
Returns:
Processor modified processor

getDefineSwitch

protected final void getDefineSwitch(java.lang.StringBuffer buffer,
                                     java.lang.String define,
                                     java.lang.String value)
Get define switch.

Specified by:
getDefineSwitch in class CommandLineCompiler
Parameters:
buffer - StringBuffer buffer
define - String preprocessor macro
value - String value, may be null.

getEnvironmentIncludePath

protected final java.io.File[] getEnvironmentIncludePath()
Get include path from environment.

Specified by:
getEnvironmentIncludePath in class CommandLineCompiler
Returns:
File[]

getIncludeDirSwitch

protected final java.lang.String getIncludeDirSwitch(java.lang.String includeDir)
Get include directory switch.

Specified by:
getIncludeDirSwitch in class CommandLineCompiler
Parameters:
includeDir - String include directory
Returns:
String command line argument

getMaximumCommandLength

public final int getMaximumCommandLength()
Get maximum command line length.

Specified by:
getMaximumCommandLength in class CommandLineCompiler
Returns:
int maximum command line length

getUndefineSwitch

protected final void getUndefineSwitch(java.lang.StringBuffer buffer,
                                       java.lang.String define)
Get undefine switch.

Specified by:
getUndefineSwitch in class CommandLineCompiler
Parameters:
buffer - StringBuffer argument destination
define - String preprocessor macro


Copyright 2001-2008 Ant-Contrib Project. All Rights Reserved.