Class GlueGenTask
An ANT org.apache.tools.ant.Task
for using GlueGen.
Usage:
<gluegen src="[source C file]"
outputrootdir="[optional output root dir]"
includes="[optional directory pattern of include files to include]"
excludes="[optional directory pattern of include files to exclude]"
includeRefid="[optional FileSet or DirSet for include files]"
literalInclude="[optional comma separated list of literal include directories, avoiding limitations of FileSet / DirSet issues]"
emitter="[emitter class name]"
config="[configuration file]"
dumpCPP="[optional boolean]"
debug="[optional boolean]"
logLevel="[optional string]" />
- Author:
- Rob Grzywinski rgrzywinski@yahoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionCreate and add the VM and classname toorg.apache.tools.ant.types.CommandlineJava. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDirset(DirSet dirset) Add a nestedorg.apache.tools.ant.types.DirSetto specify the files to include.PathAdd an optional classpath that defines the location ofGlueGenandGlueGen's dependencies.PatternSet.NameEntryAdd an include file to the list that is to be exluded.PatternSet.NameEntryAdd an exclude file to the list.PatternSet.NameEntryAdd an include file to the list.PatternSet.NameEntryAdd an include file to the list.voidexecute()Run the task.voidSet the configuration file name.voidsetDebug(boolean debug) Set the debug flag (optional).voidsetDumpCPP(boolean dumpCPP) Set the dumpCPP flag (optional).voidsetEmitter(String emitter) Set the emitter class name.voidsetExcludes(String excludes) Set the set of exclude patterns.voidsetIncludeRefid(Reference reference) Set aorg.apache.tools.ant.types.Referenceto simplify adding of complex sets of files to include.voidsetIncludes(String includes) Set the set of include patterns.voidsetLiteralInclude(String commaSeparatedIncludes) Set a literal include directories, separated with a comma.voidsetLogLevel(String logLevel) Set the logLevel (optional).voidsetOutputRootDir(String outputRootDir) Set the output root dir (optional).voidSet the source C file that is to be parsed.
-
Constructor Details
-
GlueGenTask
public GlueGenTask()Create and add the VM and classname to
org.apache.tools.ant.types.CommandlineJava.
-
-
Method Details
-
setDebug
public void setDebug(boolean debug) Set the debug flag (optional). This is called by ANT.
-
setLogLevel
Set the logLevel (optional). This is called by ANT.
-
setDumpCPP
public void setDumpCPP(boolean dumpCPP) Set the dumpCPP flag (optional). This is called by ANT.
-
setOutputRootDir
Set the output root dir (optional). This is called by ANT.
- Parameters:
outputRootDir- the optional output root dir
-
setEmitter
Set the emitter class name. This is called by ANT.
- Parameters:
emitter- the name of the emitter class
-
setConfig
Set the configuration file name. This is called by ANT.
- Parameters:
configuration- the name of the configuration file
-
setSrc
Set the source C file that is to be parsed. This is called by ANT.
- Parameters:
sourceFile- the name of the source file
-
setLiteralInclude
Set a literal include directories, separated with a comma. See the
literalIncludejavadoc for more information.- Parameters:
commaSeparatedIncludes- the comma separated directories to include
-
createInclude
public PatternSet.NameEntry createInclude()Add an include file to the list. This is called by ANT for a nested element.
- Returns:
org.apache.tools.ant.types.PatternSet.NameEntry
-
createIncludesFile
public PatternSet.NameEntry createIncludesFile()Add an include file to the list. This is called by ANT for a nested element.
- Returns:
org.apache.tools.ant.types.PatternSet.NameEntry
-
setIncludes
Set the set of include patterns. Patterns may be separated by a comma or a space. This is called by ANT.
- Parameters:
includes- the string containing the include patterns
-
createExclude
public PatternSet.NameEntry createExclude()Add an include file to the list that is to be exluded. This is called by ANT for a nested element.
- Returns:
org.apache.tools.ant.types.PatternSet.NameEntry
-
createExcludesFile
public PatternSet.NameEntry createExcludesFile()Add an exclude file to the list. This is called by ANT for a nested element.
- Returns:
org.apache.tools.ant.types.PatternSet.NameEntry
-
setExcludes
Set the set of exclude patterns. Patterns may be separated by a comma or a space. This is called by ANT.
- Parameters:
includes- the string containing the exclude patterns
-
setIncludeRefid
public void setIncludeRefid(Reference reference) Set a
?org.apache.tools.ant.types.Referenceto simplify adding of complex sets of files to include. This is called by ANT.- Parameters:
reference- aReferenceto aorg.apache.tools.ant.types.FileSetororg.apache.tools.ant.types.DirSet- Throws:
BuildException- if the specifiedReferenceis not either aFileSetorDirSet
-
addDirset
public void addDirset(DirSet dirset) Add a nested
org.apache.tools.ant.types.DirSetto specify the files to include. This is called by ANT.- Parameters:
dirset- theDirSetto be added
-
createClasspath
public Path createClasspath()Add an optional classpath that defines the location of
GlueGenandGlueGen's dependencies. -
execute
public void execute() throws BuildExceptionRun the task. This involves validating the set attributes, creating the command line to be executed and finally executing the command.
- Throws:
BuildException- See Also:
-
org.apache.tools.ant.Task#execute()
-