Package net.sf.antcontrib.cpptasks.types
Class DefineSet
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
net.sf.antcontrib.cpptasks.types.DefineSet
- All Implemented Interfaces:
Cloneable
public class DefineSet
extends org.apache.tools.ant.types.DataType
Set of preprocessor macro defines and undefines.
- Author:
- Mark A Russell mark_russell@csg_systems.com , Adam Murdoch
-
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
addDefine
(DefineArgument arg) Adds a define element.void
Adds an undefine element.void
execute()
Returns the defines and undefines in this set.final boolean
isActive()
Returns true if the define's if and unless conditions (if any) are satisfied.void
setDefine
(CUtil.StringArrayBuilder defList) A comma-separated list of preprocessor macros to define.void
setDescription
(String desc) Sets a description of the current data type.void
Sets an id that can be used to reference this element.final void
Sets the property name for the 'if' condition.void
setRefid
(org.apache.tools.ant.types.Reference r) Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location.void
setUndefine
(CUtil.StringArrayBuilder undefList) A comma-separated list of preprocessor macros to undefine.final void
Set the property name for 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
-
DefineSet
public DefineSet()
-
-
Method Details
-
addDefine
Adds a define element.- Throws:
org.apache.tools.ant.BuildException
- if reference
-
addUndefine
Adds an undefine element.- Throws:
org.apache.tools.ant.BuildException
- if reference
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Throws:
org.apache.tools.ant.BuildException
-
getDefines
Returns the defines and undefines in this set.- Throws:
org.apache.tools.ant.BuildException
-
isActive
public final boolean isActive() throws org.apache.tools.ant.BuildExceptionReturns true if the define's if and unless conditions (if any) are satisfied.- Throws:
org.apache.tools.ant.BuildException
- throws build exception if name is not set
-
setDefine
A comma-separated list of preprocessor macros to define. Use nested define elements to define macro values.- Parameters:
defList
- comma-separated list of preprocessor macros- Throws:
org.apache.tools.ant.BuildException
- throw if defineset is a reference
-
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
Sets the property name for the 'if' condition. The define will be ignored unless the property is defined. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") will throw an exception when evaluated.- Parameters:
propName
- property name
-
setRefid
public void setRefid(org.apache.tools.ant.types.Reference r) throws org.apache.tools.ant.BuildException Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location. If specified, no other attributes or child content should be specified, other than "description".- Overrides:
setRefid
in classorg.apache.tools.ant.types.DataType
- Throws:
org.apache.tools.ant.BuildException
-
setUndefine
public void setUndefine(CUtil.StringArrayBuilder undefList) throws org.apache.tools.ant.BuildException A comma-separated list of preprocessor macros to undefine.- Parameters:
undefList
- comma-separated list of preprocessor macros- Throws:
org.apache.tools.ant.BuildException
- throw if defineset is a reference
-
setUnless
Set the property name for the 'unless' condition. If named property is set, the define will be ignored. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") of the behavior will throw an exception when evaluated.- Parameters:
propName
- name of property
-