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

dox/Common/vtkDirectory.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDirectory.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00032 #ifndef __vtkDirectory_h
00033 #define __vtkDirectory_h
00034 
00035 #include "vtkObject.h"
00036 
00037 class VTK_COMMON_EXPORT vtkDirectory : public vtkObject
00038 {
00039 public:
00041 
00042   vtkTypeRevisionMacro(vtkDirectory,vtkObject);
00044 
00046   static vtkDirectory *New();
00047 
00049   virtual void PrintSelf(ostream& os, vtkIndent indent);
00050 
00054   int Open(const char* dir);
00055 
00057   int GetNumberOfFiles() { return this->NumberOfFiles; }
00058 
00060   const char* GetFile(int index);
00061 
00063   static const char* GetCurrentWorkingDirectory(char* buf, unsigned int len);
00064 
00067   static int CreateDirectory(const char* dir);
00068 
00069 protected:
00070   // delete the Files and Path ivars and set
00071   // NumberOfFiles to 0
00072   void CleanUpFilesAndPath();
00073   vtkDirectory();
00074   ~vtkDirectory() ;
00075 private:
00076   char* Path;           // Path to Open'ed directory
00077   char** Files;                 // Array of Files
00078   int NumberOfFiles;            // Number if files in open directory
00079   
00080 private:
00081   vtkDirectory(const vtkDirectory&);  // Not implemented.
00082   void operator=(const vtkDirectory&);  // Not implemented.
00083 };
00084 
00085 #endif