[Insight-developers] IOCommon.h errors

Bill Hoffman bill.hoffman@kitware.com
Thu, 10 Apr 2003 08:55:39 -0400


As per the last phone conference we (Brad and I) created itkkwsys, and this
should be used instead of IOCommon.h.   I suppose we may want to remove
IOCommon.h at this point.  Or, perhaps we should create a sub-class
of the itkkwsys/SystemTools class in Code/Common.

The functions added to IOCommon.h were both in SystemTools.hxx: 


#include <itkkwsys/SystemTools.hxx>

  /**
   * Make a new directory if it is not there.  This function
   * can make a full path even if none of the directories existed
   * prior to calling this function.
   */
  static bool MakeDirectory(const char* path); 
  ///! return true if the file is a directory.
  static bool FileIsDirectory(const char* name);


Although the new functions in IOCommon.h were copied from cmake, many of the
supporting ifdef's from the .cxx file were not copied. 
Also, it is not a good idea to put system specific
function calls in .h files.    These should be implementation details
that are implemented in the .cxx file.   This avoids system header files
being included in the files that use the class.   


-Bill