00001
00002
00003
00004
00005
00006
00007
00008
00010
00011
00012 #ifndef __LIDAR_FILE_IO_H__
00013 #define __LIDAR_FILE_IO_H__
00014
00015 #include "lidar/IO.h"
00016 #include "lidar/Mutex.h"
00017
00018 LT_BEGIN_LIDAR_NAMESPACE
00019
00030 class FileIO : public IO
00031 {
00032 CONCRETE_OBJECT(FileIO);
00033 public:
00034
00051 void init(const char *path, const char *mode);
00052 #ifdef _WIN32
00053
00069 #ifdef SWIG
00070 void init(const wchar_t *path, const char *mode);
00071 #else
00072 void init(const unsigned short *path, const char *mode);
00073 void init(const __wchar_t *path, const char *mode);
00074 #endif
00075 #endif
00076
00086 void init(const char *tempdir);
00087 #ifdef _WIN32
00088
00097 #ifdef SWIG
00098 void init(const wchar_t *tempdir);
00099 #else
00100 void init(const unsigned short *tempdir);
00101 void init(const __wchar_t *tempdir);
00102 #endif
00103 #endif
00104
00105 void unlink(void);
00106
00114 static void deleteFile(const char *path);
00122 static bool fileExists(const char *path);
00123
00124 protected:
00125 class Imp;
00126 Mutex m_openLock;
00127 int m_openCount;
00128 bool m_unlinkFile;
00129 };
00130
00131 LT_END_LIDAR_NAMESPACE
00132 #endif // __LIDAR_FILE_IO_H__