Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | 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 =========================================================================*/
00042 #ifndef __vtkDirectory_h
00043 #define __vtkDirectory_h
00044 
00045 #include "vtkObject.h"
00046 
00047 class VTK_COMMON_EXPORT vtkDirectory : public vtkObject
00048 {
00049 public:
00051 
00052   vtkTypeRevisionMacro(vtkDirectory,vtkObject);
00054 
00056   static vtkDirectory *New();
00057 
00059   virtual void PrintSelf(ostream& os, vtkIndent indent);
00060 
00064   int Open(const char* dir);
00065 
00067   int GetNumberOfFiles() { return this->NumberOfFiles; }
00068 
00070   const char* GetFile(int index);
00071 
00073   static const char* GetCurrentWorkingDirectory(char* buf, unsigned int len);
00074 
00077   static int CreateDirectory(const char* dir);
00078 
00079 protected:
00080   // delete the Files and Path ivars and set
00081   // NumberOfFiles to 0
00082   void CleanUpFilesAndPath();
00083   vtkDirectory();
00084   ~vtkDirectory() ;
00085 private:
00086   char* Path;           // Path to Open'ed directory
00087   char** Files;                 // Array of Files
00088   int NumberOfFiles;            // Number if files in open directory
00089   
00090 private:
00091   vtkDirectory(const vtkDirectory&);  // Not implemented.
00092   void operator=(const vtkDirectory&);  // Not implemented.
00093 };
00094 
00095 #endif