MrSID Decode SDK for LiDAR Reference Manual  1.1.4.4709
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 #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__