NCBI C++ ToolKit
|
Search Toolkit Book for CCompressedFile
#include <gui/widgets/wx/compressed_file.hpp>
Public Member Functions | |
CCompressedFile (const wxString &fileName) | |
CNcbiIstream & | GetIstream (bool seekable=true) |
CFormatGuess::EFormat | GuessFormat () |
void | Reset () |
Static Public Member Functions | |
static bool | FileExists (const wxString &fileName) |
Protected Types | |
enum | EType { eLocal = 0x1 , eNetwork = 0x2 , eCompressed = 0x4 } |
enum | EProtocol { eUnknown , eFile , eHTTP , eFTP } |
Protected Member Functions | |
void | x_AttachDecompressor () |
CNcbiIstream & | x_DownloadFile (CNcbiIstream &remote) |
CFormatGuess::EFormat | x_GuessFormat (CNcbiIstream &input, bool resetPosition=true) const |
CFormatGuess::EFormat | x_GuessFormatLocal () |
CFormatGuess::EFormat | x_GuessFormatNetwork () const |
EProtocol | x_GetProtocol (const wxString &path) const |
Protected Attributes | |
wxString | m_FileName |
EProtocol | m_Protocol |
unique_ptr< CNcbiIstream > | m_FileStream |
CFormatGuess::EFormat | m_ContentFmt |
CFormatGuess::EFormat | m_ArchiveFmt |
unique_ptr< CCompressionIStream > | m_Compressed |
unique_ptr< CTmpFile > | m_TempFile |
CNcbiIstream * | m_Istream |
uint8_t | m_Type |
Definition at line 46 of file compressed_file.hpp.
|
protected |
Enumerator | |
---|---|
eUnknown | |
eFile | |
eHTTP | |
eFTP |
Definition at line 66 of file compressed_file.hpp.
|
protected |
Enumerator | |
---|---|
eLocal | |
eNetwork | |
eCompressed |
Definition at line 60 of file compressed_file.hpp.
CCompressedFile::CCompressedFile | ( | const wxString & | fileName | ) |
Definition at line 46 of file compressed_file.cpp.
References CFormatGuess::CFormatHints::AddPreferredFormat(), CFormatGuess::eBZip2, eFile, eFTP, CFormatGuess::eGZip, eHTTP, eLocal, eNetwork, eUnknown, CFormatGuess::GetFormatHints(), CUrl::GetHost(), CUrl::GetPath(), CFormatGuess::GuessFormat(), m_ArchiveFmt, m_ContentFmt, m_FileName, m_FileStream, m_Protocol, m_Type, msg(), NCBI_THROW, and x_GetProtocol().
Definition at line 141 of file compressed_file.cpp.
References NStr::CompareNocase(), CUrl::GetHost(), and CUrl::GetScheme().
Referenced by CFileLoadManager::DoTransition(), CTableFormatPanel::PreviewData(), CProjectLoadOptionPanel::x_Finish(), and CFileLoadOptionPanel::x_LoadMRUFile().
CNcbiIstream & CCompressedFile::GetIstream | ( | bool | seekable = true | ) |
Definition at line 89 of file compressed_file.cpp.
References _ASSERT, eNetwork, m_Compressed, m_FileStream, m_Istream, m_Type, x_AttachDecompressor(), and x_DownloadFile().
CFormatGuess::EFormat CCompressedFile::GuessFormat | ( | ) |
Definition at line 106 of file compressed_file.cpp.
References CFormatGuess::eBZip2, CFormatGuess::eGZip, eLocal, CFormatGuess::eUnknown, m_ContentFmt, m_Type, x_GuessFormatLocal(), and x_GuessFormatNetwork().
void CCompressedFile::Reset | ( | void | ) |
Definition at line 126 of file compressed_file.cpp.
References _ASSERT, eLocal, m_Compressed, m_FileStream, m_Istream, m_TempFile, and m_Type.
|
protected |
Definition at line 154 of file compressed_file.cpp.
References CFormatGuess::eBZip2, eCompressed, CFormatGuess::eGZip, CZipCompression::fGZip, CCompressionStream::fOwnProcessor, m_ArchiveFmt, m_Compressed, m_FileStream, m_Istream, and m_Type.
Referenced by GetIstream(), and x_GuessFormatLocal().
|
protected |
Definition at line 176 of file compressed_file.cpp.
References CTmpFile::eIfExists_Reset, m_TempFile, and NcbiStreamCopy().
Referenced by GetIstream().
|
protected |
Definition at line 256 of file compressed_file.cpp.
References NStr::CompareNocase(), eFile, eFTP, eHTTP, eUnknown, CUrl::GetHost(), CUrl::GetScheme(), and m_FileName.
Referenced by CCompressedFile().
|
protected |
Definition at line 187 of file compressed_file.cpp.
References CFormatGuess::GuessFormat(), input(), and result.
Referenced by x_GuessFormatLocal(), and x_GuessFormatNetwork().
|
protected |
Definition at line 198 of file compressed_file.cpp.
References CFormatGuess::eUnknown, m_Compressed, x_AttachDecompressor(), and x_GuessFormat().
Referenced by GuessFormat().
|
protected |
Definition at line 209 of file compressed_file.cpp.
References CFormatGuess::CFormatHints::AddPreferredFormat(), CFormatGuess::eBZip2, eFile, eFTP, CFormatGuess::eGZip, eHTTP, eUnknown, CZipCompression::fGZip, CCompressionStream::fOwnProcessor, CFormatGuess::GetFormatHints(), CUrl::GetHost(), CUrl::GetPath(), CFormatGuess::GuessFormat(), m_FileName, m_Protocol, msg(), NCBI_THROW, and x_GuessFormat().
Referenced by GuessFormat().
|
protected |
Definition at line 86 of file compressed_file.hpp.
Referenced by CCompressedFile(), and x_AttachDecompressor().
|
protected |
Definition at line 87 of file compressed_file.hpp.
Referenced by GetIstream(), Reset(), x_AttachDecompressor(), and x_GuessFormatLocal().
|
protected |
Definition at line 85 of file compressed_file.hpp.
Referenced by CCompressedFile(), and GuessFormat().
|
protected |
Definition at line 82 of file compressed_file.hpp.
Referenced by CCompressedFile(), x_GetProtocol(), and x_GuessFormatNetwork().
|
protected |
Definition at line 84 of file compressed_file.hpp.
Referenced by CCompressedFile(), GetIstream(), Reset(), and x_AttachDecompressor().
|
protected |
Definition at line 89 of file compressed_file.hpp.
Referenced by GetIstream(), Reset(), and x_AttachDecompressor().
|
protected |
Definition at line 83 of file compressed_file.hpp.
Referenced by CCompressedFile(), and x_GuessFormatNetwork().
|
protected |
Definition at line 88 of file compressed_file.hpp.
Referenced by Reset(), and x_DownloadFile().
|
protected |
Definition at line 90 of file compressed_file.hpp.
Referenced by CCompressedFile(), GetIstream(), GuessFormat(), Reset(), and x_AttachDecompressor().