From 683d490074d93baa8a47db7ec43b7bd31145a12a Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Thu, 5 Nov 2009 23:00:15 +0100 Subject: Tar file expanded and committed --- site/apidocs/net/sf/antcontrib/cpptasks/CUtil.html | 775 +++++++++++++++++++++ 1 file changed, 775 insertions(+) create mode 100644 site/apidocs/net/sf/antcontrib/cpptasks/CUtil.html (limited to 'site/apidocs/net/sf/antcontrib/cpptasks/CUtil.html') diff --git a/site/apidocs/net/sf/antcontrib/cpptasks/CUtil.html b/site/apidocs/net/sf/antcontrib/cpptasks/CUtil.html new file mode 100644 index 0000000..6bc118b --- /dev/null +++ b/site/apidocs/net/sf/antcontrib/cpptasks/CUtil.html @@ -0,0 +1,775 @@ + + + + + + + +CUtil (cpptasks 1.0b5 API) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +net.sf.antcontrib.cpptasks +
+Class CUtil

+
+java.lang.Object
+  extended by net.sf.antcontrib.cpptasks.CUtil
+
+
+
+
public class CUtil
extends java.lang.Object
+ + +

+Some utilities used by the CC and Link tasks. +

+ +

+

+
Author:
+
Adam Murdoch, Curt Arnold
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classCUtil.StringArrayBuilder + +
+          A class that splits a white-space, comma-separated list into a String + array.
+ + + + + + + + + + +
+Field Summary
+static intFILETIME_EPSILON + +
+           
+  + + + + + + + + + + +
+Constructor Summary
CUtil() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static voidaddAll(java.util.Vector dest, + java.lang.Object[] src) + +
+          Adds the elements of the array to the given vector
+static intcheckDirectoryArray(java.lang.String[] names) + +
+          Checks a array of names for non existent or non directory entries and + nulls them out.
+static java.lang.StringgetBasename(java.io.File file) + +
+          Extracts the basename of a file, removing the extension, if present
+static java.io.FilegetExecutableLocation(java.lang.String exeName) + +
+          Gets the parent directory for the executable file name using the current + directory and system executable path
+static java.lang.StringgetParentPath(java.lang.String path) + +
+          Extracts the parent of a file
+static java.io.File[]getPathFromEnvironment(java.lang.String envVariable, + java.lang.String delim) + +
+          Returns an array of File for each existing directory in the specified + environment variable
+static java.lang.StringgetRelativePath(java.lang.String base, + java.io.File targetFile) + +
+          Returns a relative path for the targetFile relative to the base + directory.
+static booleanisActive(org.apache.tools.ant.Project p, + java.lang.String ifCond, + java.lang.String unlessCond) + +
+           
+static booleanisSignificantlyAfter(long time1, + long time2) + +
+          Determines whether time1 is later than time2 + to a degree that file system time truncation is not significant.
+static booleanisSignificantlyBefore(long time1, + long time2) + +
+          Determines whether time1 is earlier than time2 + to a degree that file system time truncation is not significant.
+static booleanisSystemPath(java.io.File source) + +
+          Determines if source file has a system path, + that is part of the compiler or platform.
+static java.io.File[]parsePath(java.lang.String path, + java.lang.String delim) + +
+          Parse a string containing directories into an File[]
+static intrunCommand(CCTask task, + java.io.File workingDir, + java.lang.String[] cmdline, + boolean newEnvironment, + org.apache.tools.ant.types.Environment env) + +
+          This method is exposed so test classes can overload and test the + arguments without actually spawning the compiler
+static booleansameList(java.lang.Object[] a, + java.lang.Object[] b) + +
+          Compares the contents of 2 arrays for equaliy.
+static booleansameList(java.util.Vector v, + java.lang.Object[] a) + +
+          Compares the contents of an array and a Vector for equality.
+static booleansameSet(java.lang.Object[] a, + java.util.Vector b) + +
+          Compares the contents of an array and a Vector for set equality.
+static java.lang.String[]toArray(java.util.Vector src) + +
+          Converts a vector to a string array.
+static java.lang.StringtoUnixPath(java.lang.String path) + +
+           
+static java.lang.StringtoWindowsPath(java.lang.String path) + +
+           
+static java.lang.StringxmlAttribEncode(java.lang.String attrValue) + +
+          Replaces any embedded quotes in the string so that the value can be + placed in an attribute in an XML file
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+FILETIME_EPSILON

+
+public static final int FILETIME_EPSILON
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+CUtil

+
+public CUtil()
+
+
+ + + + + + + + +
+Method Detail
+ +

+addAll

+
+public static void addAll(java.util.Vector dest,
+                          java.lang.Object[] src)
+
+
Adds the elements of the array to the given vector +

+

+
+
+
+
+ +

+checkDirectoryArray

+
+public static int checkDirectoryArray(java.lang.String[] names)
+
+
Checks a array of names for non existent or non directory entries and + nulls them out. +

+

+ +
Returns:
Count of non-null elements
+
+
+
+ +

+getBasename

+
+public static java.lang.String getBasename(java.io.File file)
+
+
Extracts the basename of a file, removing the extension, if present +

+

+
+
+
+
+ +

+getExecutableLocation

+
+public static java.io.File getExecutableLocation(java.lang.String exeName)
+
+
Gets the parent directory for the executable file name using the current + directory and system executable path +

+

+
Parameters:
exeName - Name of executable such as "cl.exe" +
Returns:
parent directory or null if not located
+
+
+
+ +

+getParentPath

+
+public static java.lang.String getParentPath(java.lang.String path)
+
+
Extracts the parent of a file +

+

+
+
+
+
+ +

+getPathFromEnvironment

+
+public static java.io.File[] getPathFromEnvironment(java.lang.String envVariable,
+                                                    java.lang.String delim)
+
+
Returns an array of File for each existing directory in the specified + environment variable +

+

+
Parameters:
envVariable - environment variable name such as "LIB" or "INCLUDE"
delim - delimitor used to separate parts of the path, typically ";" + or ":" +
Returns:
array of File's for each part that is an existing directory
+
+
+
+ +

+getRelativePath

+
+public static java.lang.String getRelativePath(java.lang.String base,
+                                               java.io.File targetFile)
+
+
Returns a relative path for the targetFile relative to the base + directory. +

+

+
Parameters:
base - base directory as returned by File.getCanonicalPath()
targetFile - target file +
Returns:
relative path of target file. Returns targetFile if there were + no commonalities between the base and the target
+
+
+
+ +

+isActive

+
+public static boolean isActive(org.apache.tools.ant.Project p,
+                               java.lang.String ifCond,
+                               java.lang.String unlessCond)
+                        throws org.apache.tools.ant.BuildException
+
+
+ +
Throws: +
org.apache.tools.ant.BuildException
+
+
+
+ +

+parsePath

+
+public static java.io.File[] parsePath(java.lang.String path,
+                                       java.lang.String delim)
+
+
Parse a string containing directories into an File[] +

+

+
Parameters:
path - path string, for example ".;c:\something\include"
delim - delimiter, typically ; or :
+
+
+
+ +

+runCommand

+
+public static int runCommand(CCTask task,
+                             java.io.File workingDir,
+                             java.lang.String[] cmdline,
+                             boolean newEnvironment,
+                             org.apache.tools.ant.types.Environment env)
+                      throws org.apache.tools.ant.BuildException
+
+
This method is exposed so test classes can overload and test the + arguments without actually spawning the compiler +

+

+ +
Throws: +
org.apache.tools.ant.BuildException
+
+
+
+ +

+sameList

+
+public static boolean sameList(java.lang.Object[] a,
+                               java.lang.Object[] b)
+
+
Compares the contents of 2 arrays for equaliy. +

+

+
+
+
+
+ +

+sameList

+
+public static boolean sameList(java.util.Vector v,
+                               java.lang.Object[] a)
+
+
Compares the contents of an array and a Vector for equality. +

+

+
+
+
+
+ +

+sameSet

+
+public static boolean sameSet(java.lang.Object[] a,
+                              java.util.Vector b)
+
+
Compares the contents of an array and a Vector for set equality. Assumes + input array and vector are sets (i.e. no duplicate entries) +

+

+
+
+
+
+ +

+toArray

+
+public static java.lang.String[] toArray(java.util.Vector src)
+
+
Converts a vector to a string array. +

+

+
+
+
+
+ +

+xmlAttribEncode

+
+public static java.lang.String xmlAttribEncode(java.lang.String attrValue)
+
+
Replaces any embedded quotes in the string so that the value can be + placed in an attribute in an XML file +

+

+
Parameters:
attrValue - value to be expressed +
Returns:
equivalent attribute literal
+
+
+
+ +

+isSignificantlyBefore

+
+public static boolean isSignificantlyBefore(long time1,
+                                            long time2)
+
+
Determines whether time1 is earlier than time2 + to a degree that file system time truncation is not significant. +

+

+
Parameters:
time1 - long first time value
time2 - long second time value +
Returns:
boolean if first time value is earlier than second time value. + If the values are within the rounding error of the file system return false.
+
+
+
+ +

+isSignificantlyAfter

+
+public static boolean isSignificantlyAfter(long time1,
+                                           long time2)
+
+
Determines whether time1 is later than time2 + to a degree that file system time truncation is not significant. +

+

+
Parameters:
time1 - long first time value
time2 - long second time value +
Returns:
boolean if first time value is later than second time value. + If the values are within the rounding error of the file system return false.
+
+
+
+ +

+toWindowsPath

+
+public static java.lang.String toWindowsPath(java.lang.String path)
+
+
+
+
+
+
+ +

+toUnixPath

+
+public static java.lang.String toUnixPath(java.lang.String path)
+
+
+
+
+
+
+ +

+isSystemPath

+
+public static boolean isSystemPath(java.io.File source)
+
+
Determines if source file has a system path, + that is part of the compiler or platform. +

+

+
Parameters:
source - source, may not be null. +
Returns:
true is source file appears to be system library + and its path should be discarded.
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+Copyright © 2001-2008 Ant-Contrib Project. All Rights Reserved. + + -- cgit v1.2.3