net.sf.antcontrib.cpptasks
Class DependencyTable

java.lang.Object
  |
  +--net.sf.antcontrib.cpptasks.DependencyTable

public final class DependencyTable
extends java.lang.Object

Author:
Curt Arnold

Inner Class Summary
 class DependencyTable.DependencyVisitor
           
 class DependencyTable.TimestampChecker
           
 
Constructor Summary
DependencyTable(java.io.File baseDir)
          Creates a target history table from dependencies.xml in the prject directory, if it exists.
 
Method Summary
 void commit(CCTask task)
           
 java.util.Enumeration elements()
          Returns an enumerator of DependencyInfo's
 DependencyInfo getDependencyInfo(java.lang.String sourceRelativeName, java.lang.String includePathIdentifier)
          This method returns a DependencyInfo for the specific source file and include path identifier
 void load()
           
 boolean needsRebuild(CCTask task, TargetInfo target, int dependencyDepth)
          Determines if the specified target needs to be rebuilt.
 DependencyInfo parseIncludes(CCTask task, CompilerConfiguration compiler, java.io.File source)
           
 void walkDependencies(CCTask task, DependencyInfo dependInfo, CompilerConfiguration compiler, DependencyInfo[] stack, DependencyTable.DependencyVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DependencyTable

public DependencyTable(java.io.File baseDir)
Creates a target history table from dependencies.xml in the prject directory, if it exists. Otherwise, initializes the dependencies empty.
Parameters:
task - task used for logging history load errors
baseDir - output directory for task
Method Detail

load

public void load()
          throws java.io.IOException,
                 javax.xml.parsers.ParserConfigurationException,
                 org.xml.sax.SAXException

elements

public java.util.Enumeration elements()
Returns an enumerator of DependencyInfo's

needsRebuild

public boolean needsRebuild(CCTask task,
                            TargetInfo target,
                            int dependencyDepth)
Determines if the specified target needs to be rebuilt. This task may result in substantial IO as files are parsed to determine their dependencies

getDependencyInfo

public DependencyInfo getDependencyInfo(java.lang.String sourceRelativeName,
                                        java.lang.String includePathIdentifier)
This method returns a DependencyInfo for the specific source file and include path identifier

parseIncludes

public DependencyInfo parseIncludes(CCTask task,
                                    CompilerConfiguration compiler,
                                    java.io.File source)

walkDependencies

public void walkDependencies(CCTask task,
                             DependencyInfo dependInfo,
                             CompilerConfiguration compiler,
                             DependencyInfo[] stack,
                             DependencyTable.DependencyVisitor visitor)
                      throws org.apache.tools.ant.BuildException

commit

public void commit(CCTask task)


Copyright © 2001-2002 Ant-Contrib project. All Rights Reserved.