WriteFiles.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __WRITE_FILES_H__
00018 #define __WRITE_FILES_H__
00019
00020 #include <stdio.h>
00021 #include "GlfFile.h"
00022
00023
00024 void testWrite();
00025 void testHeaderWrite();
00026 void testWriteCopiedHeader();
00027
00028 class TestWrite
00029 {
00030 public:
00031 void testWrite();
00032 private:
00033 void writeHeader(GlfFile& glfOut, int headerNum);
00034 void writeRefSection1(GlfFile& glfOut);
00035 void writeSec1Record1(GlfFile& glfOut);
00036 void writeSec1Record2(GlfFile& glfOut);
00037 void writeEndMarker(GlfFile& glfOut);
00038 void writeRefSection2(GlfFile& glfOut);
00039 void writeSec2Record1(GlfFile& glfOut);
00040
00041 void readHeader(GlfFile& glfIn, int headerNum);
00042 void readRefSection1(GlfFile& glfIn);
00043 void readSec1Record1(GlfFile& glfIn);
00044 void readSec1Record2(GlfFile& glfIn);
00045 void readEndMarker(GlfFile& glfIn);
00046 void readRefSection2(GlfFile& glfIn);
00047 void readSec2Record1(GlfFile& glfIn);
00048
00049 void checkEOF(GlfFile& glfIn);
00050
00051
00052 static const std::string HEADER_TEXT1;
00053
00054
00055 static const std::string SEC1_REFNAME;
00056 static const uint32_t SEC1_REFLEN = 200;
00057
00058
00059 static const uint8_t SEC1REC1_RECTYPE = 1;
00060 static const uint8_t SEC1REC1_REFBASE = 4;
00061 static const uint32_t SEC1REC1_OFFSET = 99;
00062 static const uint32_t SEC1REC1_MINLK = 55;
00063 static const uint32_t SEC1REC1_READDEPTH = 31;
00064 static const uint8_t SEC1REC1_RMSMAPQ = 25;
00065
00066
00067 static const uint8_t SEC1REC2_RECTYPE = 2;
00068 static const uint8_t SEC1REC2_REFBASE = 1;
00069 static const uint32_t SEC1REC2_OFFSET = 6;
00070 static const uint32_t SEC1REC2_MINLK = 44;
00071 static const uint32_t SEC1REC2_READDEPTH = 66;
00072 static const uint8_t SEC1REC2_RMSMAPQ = 32;
00073 static const uint8_t SEC1REC2_LKHOM1 = 98;
00074 static const uint8_t SEC1REC2_LKHOM2 = 86;
00075 static const uint8_t SEC1REC2_LKHET = 73;
00076 static const int16_t SEC1REC2_INDELLEN1 = 2;
00077 static const int16_t SEC1REC2_INDELLEN2 = -3;
00078 static const std::string SEC1REC2_INDELSEQ1;
00079 static const std::string SEC1REC2_INDELSEQ2;
00080
00081
00082 static const std::string SEC2_REFNAME;
00083 static const uint32_t SEC2_REFLEN = 102;
00084
00085
00086 static const uint8_t SEC2REC1_RECTYPE = 1;
00087 static const uint8_t SEC2REC1_REFBASE = 2;
00088 static const uint32_t SEC2REC1_OFFSET = 50;
00089 static const uint32_t SEC2REC1_MINLK = 55;
00090 static const uint32_t SEC2REC1_READDEPTH = 31;
00091 static const uint8_t SEC2REC1_RMSMAPQ = 25;
00092
00093
00094 static const std::string HEADER_TEXT2;
00095
00096 static const std::string HEADER_TEXT3;
00097 };
00098 #endif