net.sf.antcontrib.cpptasks.types

Class DefineSet


public class DefineSet
extends DataType

Set of preprocessor macro defines and undefines.
Authors:
Mark A Russell mark_russell@csg_systems.com
Adam Murdoch

Method Summary

void
addDefine(DefineArgument arg)
Adds a define element.
void
addUndefine(UndefineArgument arg)
Adds an undefine element.
void
execute()
UndefineArgument[]
getDefines()
Returns the defines and undefines in this set.
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
setId(String id)
Sets an id that can be used to reference this element.
void
setIf(String propName)
Sets the property name for the 'if' condition.
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.
void
setUndefine(CUtil.StringArrayBuilder undefList)
A comma-separated list of preprocessor macros to undefine.
void
setUnless(String propName)
Set the property name for the 'unless' condition.

Method Details

addDefine

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

addUndefine

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

execute

public void execute()
            throws org.apache.tools.ant.BuildException

getDefines

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

isActive

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

setDefine

public void setDefine(CUtil.StringArrayBuilder defList)
            throws BuildException
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

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)
            throws 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".

setUndefine

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

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 B) 2001-2006 Ant-Contrib project. All Rights Reserved.