terp - the ANT Tasks
v1.3.337

com.codemesh.terp.ant.compiler.cpp
Class ObjectsOption

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.types.DataType
          extended by org.apache.tools.ant.types.AbstractFileSet
              extended by org.apache.tools.ant.types.FileSet
                  extended by com.codemesh.terp.ant.compiler.cpp.ObjectsOption
All Implemented Interfaces:
CompilerOption<CppCompiler>, java.lang.Cloneable, org.apache.tools.ant.types.ResourceCollection, org.apache.tools.ant.types.selectors.SelectorContainer

public class ObjectsOption
extends org.apache.tools.ant.types.FileSet
implements CompilerOption<CppCompiler>

An option which allows the addition of object files to the link.


Field Summary
 
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
  ObjectsOption()
           
protected ObjectsOption(org.apache.tools.ant.types.FileSet fileset)
           
 
Method Summary
 void addCommands(java.util.List<java.lang.String> commandList, CppCompiler compiler, CompilerPhase phase)
          Adds the compiler switches repreesnted by this option to the list of switches.
 boolean appliesTo(CppCompiler compiler, CompilerPhase phase)
          Returns true if this compiler option applies to the given compiler and compiler phase.
 java.lang.String getIf()
          Returns the condition that must be satidifed to execute the implementing task.
 java.lang.String getUnless()
          Returns the condition that must not be satidifed to execute the implementing task.
 boolean satisfies(TerpContext ctx)
          Returns true if both conditions are met within the given terp context.
 void setIf(java.lang.String condition)
          Sets a condition that must be satisfied to execute the implementing task.
 void setUnless(java.lang.String condition)
          Sets a condition that must not be satisfied to execute the implementing task.
 
Methods inherited from class org.apache.tools.ant.types.FileSet
clone, isFilesystemOnly, iterator, size
 
Methods inherited from class org.apache.tools.ant.types.AbstractFileSet
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addReadable, addSelector, addSize, addType, addWritable, appendExcludes, appendIncludes, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, dieOnCircularReference, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getDirectoryScanner, getMaxLevelsOfSymlinks, getRef, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setDir, setErrorOnMissingDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setMaxLevelsOfSymlinks, setRefid, setupDirectoryScanner, setupDirectoryScanner, toString
 
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectsOption

public ObjectsOption()

ObjectsOption

protected ObjectsOption(org.apache.tools.ant.types.FileSet fileset)
Method Detail

addCommands

public void addCommands(java.util.List<java.lang.String> commandList,
                        CppCompiler compiler,
                        CompilerPhase phase)
Description copied from interface: CompilerOption
Adds the compiler switches repreesnted by this option to the list of switches. Some compiler options may result in more than one switch being added to a compiler invocation. Other compiler options may result in different options being added in different phases (compilation vs. linking) of the build.

This method is called by the compiler repeatedly with different values for the compiler phase to account for these possibilities.

Specified by:
addCommands in interface CompilerOption<CppCompiler>
Parameters:
commandList - the list to which the compiler switches represented by this option (if any) are added.
compiler - the compiler for which we're doing this.
phase - the compiler phase in wihch we're doing this.

appliesTo

public boolean appliesTo(CppCompiler compiler,
                         CompilerPhase phase)
Description copied from interface: CompilerOption
Returns true if this compiler option applies to the given compiler and compiler phase. Not every option has switches to contribute for every compiler and every compilation phase. This method allows a quick, inexpensive check to filter out potentially more expensive calls later on.

Specified by:
appliesTo in interface CompilerOption<CppCompiler>
Parameters:
compiler - the compiler for which we're asking.
phase - the compiler phase we're executing.
Returns:

getIf

public java.lang.String getIf()
Description copied from interface: CompilerOption
Returns the condition that must be satidifed to execute the implementing task.

Specified by:
getIf in interface CompilerOption<CppCompiler>
Returns:
the boolean expression.

setIf

public void setIf(java.lang.String condition)
Description copied from interface: CompilerOption
Sets a condition that must be satisfied to execute the implementing task.

Specified by:
setIf in interface CompilerOption<CppCompiler>
Parameters:
condition - a terp expression that must evaluate to a boolean value.

getUnless

public java.lang.String getUnless()
Description copied from interface: CompilerOption
Returns the condition that must not be satidifed to execute the implementing task.

Specified by:
getUnless in interface CompilerOption<CppCompiler>
Returns:
the boolean expression.

setUnless

public void setUnless(java.lang.String condition)
Description copied from interface: CompilerOption
Sets a condition that must not be satisfied to execute the implementing task.

Specified by:
setUnless in interface CompilerOption<CppCompiler>
Parameters:
condition - a terp expression that must evaluate to a boolean value.

satisfies

public boolean satisfies(TerpContext ctx)
Description copied from interface: CompilerOption
Returns true if both conditions are met within the given terp context.

Specified by:
satisfies in interface CompilerOption<CppCompiler>
Parameters:
ctx - the terp context in which the logical expressions are evaluated.
Returns:
true or false.

terp - the ANT Tasks
v1.3.337

Copyright © 2008-2016 by Codemesh, Inc. All Rights Reserved.