X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fapi%2Finternal%2FBgzfStream_p.h;h=88d7472eeebfa81bed6cd2021841a2534877b7ac;hb=9f1ce8c47aeadb6dc1320b52ee671c3341b97935;hp=07aae52a195751281884e3b8c164663bcd2702bf;hpb=8a90b7aefffaf186053ef4da96c8663bf528274a;p=bamtools.git diff --git a/src/api/internal/BgzfStream_p.h b/src/api/internal/BgzfStream_p.h index 07aae52..88d7472 100644 --- a/src/api/internal/BgzfStream_p.h +++ b/src/api/internal/BgzfStream_p.h @@ -2,7 +2,7 @@ // BgzfStream_p.h (c) 2011 Derek Barnett // Marth Lab, Department of Biology, Boston College // --------------------------------------------------------------------------- -// Last modified: 7 October 2011(DB) +// Last modified: 10 October 2011(DB) // --------------------------------------------------------------------------- // Based on BGZF routines developed at the Broad Institute. // Provides the basic functionality for reading & writing BGZF files @@ -22,12 +22,8 @@ // // We mean it. -#include -#include -#include -#include "zlib.h" -#include -#include +#include "api/api_global.h" +#include "api/IBamIODevice.h" #include namespace BamTools { @@ -46,8 +42,7 @@ class BgzfStream { void Close(void); // returns true if BgzfStream open for IO bool IsOpen(void) const; - // opens the BGZF file (mode is either "rb" for reading, or "wb" for writing) - void Open(const std::string& filename, const char* mode); + // opens the BGZF file void Open(const std::string& filename, const IBamIODevice::OpenMode mode); // reads BGZF data into a byte buffer size_t Read(char* data, const size_t dataLength); @@ -84,10 +79,7 @@ class BgzfStream { unsigned int m_blockOffset; uint64_t m_blockAddress; - bool m_isOpen; - bool m_isWriteOnly; bool m_isWriteCompressed; - IBamIODevice* m_device; struct RaiiWrapper { @@ -95,7 +87,6 @@ class BgzfStream { ~RaiiWrapper(void); char* UncompressedBlock; char* CompressedBlock; - FILE* Stream; }; RaiiWrapper Resources; };