MrSID Decode SDK for LiDAR Reference Manual  1.1.3.4427
FileIO.h
Go to the documentation of this file.
00001 /* //////////////////////////////////////////////////////////////////////////
00002 //                                                                         //
00003 // This code is Copyright (c) 2008-2010 LizardTech, Inc, 1008 Western      //
00004 // Avenue, Suite 200, Seattle, WA 98104.  Unauthorized use or distribution //
00005 // prohibited.  Access to and use of this code is permitted only under     //
00006 // license from LizardTech, Inc.  Portions of the code are protected by    //
00007 // US and foreign patents and other filings. All Rights Reserved.          //
00008 //                                                                         //
00010 /* PUBLIC */
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    void init(const wchar_t *path, const char *mode);
00070 #endif
00071 
00081    void init(const char *tempdir);
00082 #ifdef _WIN32
00083 
00092    void init(const wchar_t *tempdir);
00093 #endif
00094 
00095    void unlink(void);
00096 
00104    static void deleteFile(const char *path);
00112    static bool fileExists(const char *path);
00113 
00114 protected:
00115    class Imp;
00116    Mutex m_openLock;
00117    int m_openCount;
00118    bool m_unlinkFile;
00119 };
00120 
00121 LT_END_LIDAR_NAMESPACE
00122 #endif // __LIDAR_FILE_IO_H__