Package net.sf.antcontrib.cpptasks
Class PrecompileDef
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
net.sf.antcontrib.cpptasks.PrecompileDef
- All Implemented Interfaces:
Cloneable
public final class PrecompileDef
extends org.apache.tools.ant.types.DataType
An element that specifies a prototype file and rules for source files that
should not use precompiled headers
- Author:
- Curt Arnold
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendExceptFileSet
(ConditionalFileSet exceptSet) Method used by PrecompileExceptDef to add exception set to PrecompileDef.Adds filesets that specify files that should not be processed with precompiled headers enabled.void
execute()
String[]
Gets prototype source fileboolean
isActive()
void
setDescription
(String desc) Sets a description of the current data type.void
Sets an id that can be used to reference this element.void
Set the 'if' condition.void
setPrototype
(File prototype) Sets file to precompile.void
setRefid
(org.apache.tools.ant.types.Reference ref) Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location.void
Set the 'unless' condition.Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toString
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setLocation, setProject
-
Constructor Details
-
PrecompileDef
public PrecompileDef()Constructor
-
-
Method Details
-
appendExceptFileSet
Method used by PrecompileExceptDef to add exception set to PrecompileDef. -
createExcept
Adds filesets that specify files that should not be processed with precompiled headers enabled. -
execute
public void execute() throws org.apache.tools.ant.BuildException- Throws:
org.apache.tools.ant.BuildException
-
getExceptFiles
-
getPrototype
Gets prototype source file -
isActive
public boolean isActive() -
setDescription
Sets a description of the current data type.- Overrides:
setDescription
in classorg.apache.tools.ant.ProjectComponent
-
setId
Sets an id that can be used to reference this element.- Parameters:
id
- id
-
setIf
Set the 'if' condition. The processor will be ignored unless the property is defined. The value of property is insignificant, but values that would imply misinterpretation ("false", "no") will throw an exception when isActive() is evaluated.- Parameters:
propName
- name of property
-
setPrototype
Sets file to precompile. Should be a source file that includes only one unguarded header file. Default value is "stdafx.cpp".- Parameters:
prototype
- file path for prototype source file
-
setRefid
public void setRefid(org.apache.tools.ant.types.Reference ref) Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location.- Overrides:
setRefid
in classorg.apache.tools.ant.types.DataType
- Parameters:
ref
- Reference to other element
-
setUnless
Set the 'unless' condition. If named property exists at execution time, the processor will be ignored. Value of property is insignificant, but values that would imply misinterpretation ("false", "no") of the behavior will throw an exception when isActive is called.- Parameters:
propName
- name of property
-