net.sf.antcontrib.cpptasks.types

Class DefineSet

public class DefineSet extends DataType

Set of preprocessor macro defines and undefines.

Author: Mark A Russell mark_russell@csg_systems.com Adam Murdoch

Method Summary
voidaddDefine(DefineArgument arg)
Adds a define element.
voidaddUndefine(UndefineArgument arg)
Adds an undefine element.
voidexecute()
UndefineArgument[]getDefines()
Returns the defines and undefines in this set.
booleanisActive()
Returns true if the define's if and unless conditions (if any) are satisfied.
voidsetDefine(CUtil.StringArrayBuilder defList)
A comma-separated list of preprocessor macros to define.
voidsetDescription(String desc)
Sets a description of the current data type.
voidsetId(String id)
Sets an id that can be used to reference this element.
voidsetIf(String propName)
Sets the property name for the 'if' condition.
voidsetRefid(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.
voidsetUndefine(CUtil.StringArrayBuilder undefList)
A comma-separated list of preprocessor macros to undefine.
voidsetUnless(String propName)
Set the property name for the 'unless' condition.

Method Detail

addDefine

public void addDefine(DefineArgument arg)
Adds a define element.

Throws: BuildException if reference

addUndefine

public void addUndefine(UndefineArgument arg)
Adds an undefine element.

Throws: BuildException if reference

execute

public void execute()

getDefines

public UndefineArgument[] getDefines()
Returns the defines and undefines in this set.

isActive

public final boolean isActive()
Returns true if the define's if and unless conditions (if any) are satisfied.

Throws: BuildException throws build exception if name is not set

setDefine

public void setDefine(CUtil.StringArrayBuilder defList)
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: BuildException throw if defineset is a reference

setDescription

public void setDescription(String desc)
Sets a description of the current data type.

setId

public void setId(String id)
Sets an id that can be used to reference this element.

Parameters: id id

setIf

public final void setIf(String propName)
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(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. If specified, no other attributes or child content should be specified, other than "description".

setUndefine

public void setUndefine(CUtil.StringArrayBuilder undefList)
A comma-separated list of preprocessor macros to undefine.

Parameters: undefList comma-separated list of preprocessor macros

Throws: BuildException throw if defineset is a reference

setUnless

public final void setUnless(String propName)
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

Copyright ? 2001-2011 Ant-Contrib project. All Rights Reserved.