00001 #ifndef __GENERAL_VU_LIGHTFIELD_FILE_H__
00002 #define __GENERAL_VU_LIGHTFIELD_FILE_H__
00003
00004 #include <fstream.h>
00005 #include "vuString.h"
00006
00007 class vuLightfieldFile
00008 {
00009 public:
00010 vuLightfieldFile();
00011
00013 vuLightfieldFile(const char *fileName, bool isWritingMode);
00014
00016 ~vuLightfieldFile();
00017
00019 const char* getFileName();
00020
00022 const vuString getErrorMessage();
00023
00025 bool open();
00026
00028 void close();
00029
00031 bool readHeader();
00032
00034 bool writeHeader();
00035
00036 protected:
00037 bool _setErrorMessage(const char *msg);
00038 bool _isReadyForReading();
00039 bool _isReadyForWriting();
00040
00041 protected:
00043 word m_Mode;
00045 dword m_DataSize;
00047 vuString m_DataName;
00049 bool m_IsWritingMode;
00051 vuString m_FileName;
00053 vuString m_ErrorMessage;
00055 fstream *m_FileStream;
00057 bool m_IsHeaderDone;
00058 };
00059
00060 #endif