net.sf.antcontrib.cpptasks.types

Class LibrarySet

public class LibrarySet extends DataType

A set of library names. Libraries can also be added to a link by specifying them in a fileset. For most Unix-like compilers, libset will result in a series of -l and -L linker arguments. For Windows compilers, the library names will be used to locate the appropriate library files which will be added to the linkers input file list as if they had been specified in a fileset.

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

Constructor Summary
LibrarySet()
Method Summary
voidexecute()
StringgetDataset()
Gets the dataset.
FilegetDir(Project project)
protected FileSetgetFileSet()
String[]getLibs()
LibraryTypeEnumgetType()
Gets preferred library type
booleanisActive(Project p)
Returns true if the define's if and unless conditions (if any) are satisfied.
voidsetCaseSensitive(boolean isCaseSensitive)
Sets case sensitivity of the file system.
voidsetDataset(String dataset)
Sets the dataset.
voidsetDir(File dir)
Library directory.
voidsetIf(String propName)
Sets the property name for the 'if' condition.
voidsetLibs(CUtil.StringArrayBuilder libs)
Comma-separated list of library names without leading prefixes, such as "lib", or extensions, such as ".so" or ".a".
voidsetProject(Project project)
voidsetType(LibraryTypeEnum type)
Sets the preferred library type.
voidsetUnless(String propName)
Set the property name for the 'unless' condition.
voidvisitLibraries(Project project, Linker linker, File[] libpath, FileVisitor visitor)

Constructor Detail

LibrarySet

public LibrarySet()

Method Detail

execute

public void execute()

getDataset

public String getDataset()
Gets the dataset. Used on OS390 if the libs are in a dataset.

Returns: Returns a String

getDir

public File getDir(Project project)

getFileSet

protected FileSet getFileSet()

getLibs

public String[] getLibs()

getType

public LibraryTypeEnum getType()
Gets preferred library type

Returns: library type, may be null.

isActive

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

setCaseSensitive

public void setCaseSensitive(boolean isCaseSensitive)
Sets case sensitivity of the file system. If not set, will default to the linker's case sensitivity.

Parameters: isCaseSensitive "true"|"on"|"yes" if file system is case sensitive, "false"|"off"|"no" when not.

setDataset

public void setDataset(String dataset)
Sets the dataset. Used on OS390 if the libs are in a dataset.

Parameters: dataset The dataset to set

setDir

public void setDir(File dir)
Library directory.

Parameters: dir library directory

setIf

public void setIf(String propName)
Sets the property name for the 'if' condition. The library set 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

setLibs

public void setLibs(CUtil.StringArrayBuilder libs)
Comma-separated list of library names without leading prefixes, such as "lib", or extensions, such as ".so" or ".a".

setProject

public void setProject(Project project)

setType

public void setType(LibraryTypeEnum type)
Sets the preferred library type. Supported values "shared", "static", and "framework". "framework" is equivalent to "shared" on non-Darwin platforms.

setUnless

public void setUnless(String propName)
Set the property name for the 'unless' condition. If named property is set, the library set 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

visitLibraries

public void visitLibraries(Project project, Linker linker, File[] libpath, FileVisitor visitor)
Copyright ? 2001-2011 Ant-Contrib project. All Rights Reserved.