#include <fio_RelFile.h>
See picture about relative file structure
Definition at line 54 of file fio_RelFile.h.
Public Member Functions | |
| fio_RelFileHeader_t () | |
| fio_RelFileHeader_t (fio_File &file) | |
| fio_RelFileHeader_t (string a_identification, UInt16_t a_fileID, UInt16_t a_recordStructVersion, UInt16_t a_recordSize, UInt16_t a_loUVHeaderLen, UInt16_t a_numOfDifVector, UInt16_t a_smallestVectorSize) | |
| ~fio_RelFileHeader_t () | |
Public Attributes | |
| char | identification [fio_FH_IDENTIFICATION_LEN_d] |
| All follow fields until iniTime has to match to proper work. | |
| UInt16_t | fileID |
| UInt16_t | recordStructVersion |
| UInt16_t | recordSize |
| UInt16_t | loUVHeaderLen |
| UInt16_t | numOfDifVector |
| UInt16_t | smallestVectorSize |
| UInt16_t | relFileHeaderLen |
| UInt16_t | byteOrder |
| ivd_Time32_t | initTime |
| UInt16_t | headerStructVersion |
| There is reserved some space in case of some changes, that could be chacked in future versions. | |
| log_CLASSID_m | |
Friends | |
| ostream & | operator<< (ostream &a_os, fio_RelFileHeader_t &a_rfh) |
| fio_RelFileHeader_t::fio_RelFileHeader_t | ( | ) | [inline] |
| fio_RelFileHeader_t::fio_RelFileHeader_t | ( | fio_File & | file | ) |
Definition at line 66 of file fio_RelFile.cpp.
References log_FUNC_m, cmn_File::ReadF(), and cmn_File::SeekF().
00066 { 00067 log_FUNC_m(fio_RelFileHeader_t); 00068 00069 file.SeekF(0); 00070 file.ReadF(this, sizeof(*this)); 00071 }

| fio_RelFileHeader_t::fio_RelFileHeader_t | ( | string | a_identification, | |
| UInt16_t | a_fileID, | |||
| UInt16_t | a_recordStructVersion, | |||
| UInt16_t | a_recordSize, | |||
| UInt16_t | a_loUVHeaderLen, | |||
| UInt16_t | a_numOfDifVector, | |||
| UInt16_t | a_smallestVectorSize | |||
| ) |
Definition at line 73 of file fio_RelFile.cpp.
References byteOrder, c_fio_headerStructVersion, c_fio_maxRelFileHeadLen, fileID, fio_FH_IDENTIFICATION_LEN_d, cmn_Time::GetTime_t(), headerStructVersion, ibo_ENDIAN_LITTLE, identification, ie_RECORD_TOO_LARGE, initTime, ivd_Error, log_FUNC_m, loUVHeaderLen, numOfDifVector, recordSize, recordStructVersion, relFileHeaderLen, and smallestVectorSize.
00081 { 00082 log_FUNC_m(fio_RelFileHeader_t); 00083 // TO DO 00084 if ( a_identification.length() >= fio_FH_IDENTIFICATION_LEN_d) { 00085 strncpy(identification, a_identification.data(), (unsigned int)fio_FH_IDENTIFICATION_LEN_d); 00086 } 00087 else { 00088 strncpy(identification, a_identification.data(), a_identification.length()); 00089 char *p; 00090 char *q = identification + fio_FH_IDENTIFICATION_LEN_d; 00091 for (p = identification + a_identification.length(); p < q; p++) { 00092 *p = 0; 00093 } 00094 } 00095 00096 fileID = a_fileID; 00097 recordStructVersion= a_recordStructVersion; 00098 recordSize = a_recordSize; 00099 loUVHeaderLen = a_loUVHeaderLen; 00100 numOfDifVector = a_numOfDifVector; 00101 smallestVectorSize = a_smallestVectorSize; 00102 00103 if ( sizeof(fio_RelFileHeader_t) > c_fio_maxRelFileHeadLen ) { 00104 throw ivd_Error(ie_RECORD_TOO_LARGE, 00105 "Relative file header record exceed max size.", true); 00106 } 00107 relFileHeaderLen = sizeof(fio_RelFileHeader_t); 00108 byteOrder = ibo_ENDIAN_LITTLE; 00109 cmn_Time time; 00110 initTime = time.GetTime_t(); 00111 headerStructVersion= c_fio_headerStructVersion; 00112 }

| fio_RelFileHeader_t::~fio_RelFileHeader_t | ( | ) | [inline] |
| ostream& operator<< | ( | ostream & | a_os, | |
| fio_RelFileHeader_t & | a_rfh | |||
| ) | [friend] |
Definition at line 116 of file fio_RelFile.cpp.
00116 { 00117 // string pref(a_et.Prefix, 2); 00118 cmn_Time t(a_rfh.initTime); 00119 a_os << "\n### Relative file header ###\n" 00120 << "identification:\n" << cmn_HexDump(&a_rfh.identification, fio_FH_IDENTIFICATION_LEN_d, 32, true) 00121 << "file ID = " << a_rfh.fileID << '\n' // database unique 00122 << "rec struct ver = " << a_rfh.recordStructVersion << '\n' // version of record structure 00123 << "REC SIZE = " << a_rfh.recordSize << '\n' 00124 << "UV header len = " << a_rfh.loUVHeaderLen << '\n' // size of pointers to records 00125 << "num of dif vec = " << a_rfh.numOfDifVector << '\n' 00126 << "small vec size = " << a_rfh.smallestVectorSize << '\n' 00127 << "relF hdr len = " << a_rfh.relFileHeaderLen << '\n' 00128 << "byte order = " << a_rfh.byteOrder << '\n' // big or little endian 00129 << "creation time = " << t.Time2YMDhms() << '\n' // time of initialization of header 00130 << "hdr struct ver = " << a_rfh.headerStructVersion << '\n';// 00131 return a_os; 00132 }
| char fio_RelFileHeader_t::identification[fio_FH_IDENTIFICATION_LEN_d] |
All follow fields until iniTime has to match to proper work.
Definition at line 72 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 74 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 75 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), operator<<(), RevertUpdate(), and Update().
Definition at line 76 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 77 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 78 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 79 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 80 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 81 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
There is reserved some space in case of some changes, that could be chacked in future versions.
Definition at line 88 of file fio_RelFile.h.
Referenced by fio_RelFile::fio_RelFile(), fio_RelFileHeader_t(), and operator<<().
Definition at line 90 of file fio_RelFile.h.
1.5.6