Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkDirectory.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDirectory.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00028 #ifndef __vtkDirectory_h
00029 #define __vtkDirectory_h
00030 
00031 #include "vtkObject.h"
00032 
00033 class VTK_COMMON_EXPORT vtkDirectory : public vtkObject
00034 {
00035 public:
00037 
00038   vtkTypeRevisionMacro(vtkDirectory,vtkObject);
00040 
00042   static vtkDirectory *New();
00043 
00045   virtual void PrintSelf(ostream& os, vtkIndent indent);
00046 
00050   int Open(const char* dir);
00051 
00053   int GetNumberOfFiles() { return this->NumberOfFiles; }
00054 
00056   const char* GetFile(int index);
00057 
00059   static const char* GetCurrentWorkingDirectory(char* buf, unsigned int len);
00060 
00063   static int MakeDirectory(const char* dir);
00064 
00065 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00066 # define CreateDirectoryA CreateDirectory
00067 # define CreateDirectoryW CreateDirectory
00068 #endif
00069 
00071   VTK_LEGACY(static int CreateDirectory(const char* dir));
00072 
00073 #ifdef VTK_WORKAROUND_WINDOWS_MANGLE
00074 # undef CreateDirectoryW
00075 # undef CreateDirectoryA
00076   //BTX
00077   VTK_LEGACY(static int CreateDirectoryA(const char* dir));
00078   VTK_LEGACY(static int CreateDirectoryW(const char* dir));
00079   //ETX
00080 #endif
00081 
00082 protected:
00083   // delete the Files and Path ivars and set
00084   // NumberOfFiles to 0
00085   void CleanUpFilesAndPath();
00086   vtkDirectory();
00087   ~vtkDirectory() ;
00088 private:
00089   char* Path;           // Path to Open'ed directory
00090   char** Files;                 // Array of Files
00091   int NumberOfFiles;            // Number if files in open directory
00092 
00093   static int CreateDirectoryInternal(const char* dir);
00094 private:
00095   vtkDirectory(const vtkDirectory&);  // Not implemented.
00096   void operator=(const vtkDirectory&);  // Not implemented.
00097 };
00098 
00099 #endif

Generated on Thu Sep 7 11:42:28 2006 for VTK by  doxygen 1.4.3-20050530