NCBI C++ ToolKit
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CCompressedFile Class Reference

Search Toolkit Book for CCompressedFile

#include <gui/widgets/wx/compressed_file.hpp>

Public Member Functions

 CCompressedFile (const wxString &fileName)
 
CNcbiIstreamGetIstream (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 ()
 
CNcbiIstreamx_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< CNcbiIstreamm_FileStream
 
CFormatGuess::EFormat m_ContentFmt
 
CFormatGuess::EFormat m_ArchiveFmt
 
unique_ptr< CCompressionIStreamm_Compressed
 
unique_ptr< CTmpFilem_TempFile
 
CNcbiIstreamm_Istream
 
uint8_t m_Type
 

Detailed Description

Definition at line 46 of file compressed_file.hpp.

Member Enumeration Documentation

◆ EProtocol

Enumerator
eUnknown 
eFile 
eHTTP 
eFTP 

Definition at line 66 of file compressed_file.hpp.

◆ EType

enum CCompressedFile::EType
protected
Enumerator
eLocal 
eNetwork 
eCompressed 

Definition at line 60 of file compressed_file.hpp.

Constructor & Destructor Documentation

◆ CCompressedFile()

CCompressedFile::CCompressedFile ( const wxString &  fileName)

Member Function Documentation

◆ FileExists()

bool CCompressedFile::FileExists ( const wxString &  fileName)
static

◆ GetIstream()

CNcbiIstream & CCompressedFile::GetIstream ( bool  seekable = true)

◆ GuessFormat()

CFormatGuess::EFormat CCompressedFile::GuessFormat ( )

◆ Reset()

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.

◆ x_AttachDecompressor()

void CCompressedFile::x_AttachDecompressor ( )
protected

◆ x_DownloadFile()

CNcbiIstream & CCompressedFile::x_DownloadFile ( CNcbiIstream remote)
protected

Definition at line 176 of file compressed_file.cpp.

References CTmpFile::eIfExists_Reset, m_TempFile, and NcbiStreamCopy().

Referenced by GetIstream().

◆ x_GetProtocol()

CCompressedFile::EProtocol CCompressedFile::x_GetProtocol ( const wxString &  path) const
protected

◆ x_GuessFormat()

CFormatGuess::EFormat CCompressedFile::x_GuessFormat ( CNcbiIstream input,
bool  resetPosition = true 
) const
protected

Definition at line 187 of file compressed_file.cpp.

References CFormatGuess::GuessFormat(), input(), and result.

Referenced by x_GuessFormatLocal(), and x_GuessFormatNetwork().

◆ x_GuessFormatLocal()

CFormatGuess::EFormat CCompressedFile::x_GuessFormatLocal ( )
protected

◆ x_GuessFormatNetwork()

CFormatGuess::EFormat CCompressedFile::x_GuessFormatNetwork ( ) const
protected

Member Data Documentation

◆ m_ArchiveFmt

CFormatGuess::EFormat CCompressedFile::m_ArchiveFmt
protected

Definition at line 86 of file compressed_file.hpp.

Referenced by CCompressedFile(), and x_AttachDecompressor().

◆ m_Compressed

unique_ptr<CCompressionIStream> CCompressedFile::m_Compressed
protected

Definition at line 87 of file compressed_file.hpp.

Referenced by GetIstream(), Reset(), x_AttachDecompressor(), and x_GuessFormatLocal().

◆ m_ContentFmt

CFormatGuess::EFormat CCompressedFile::m_ContentFmt
protected

Definition at line 85 of file compressed_file.hpp.

Referenced by CCompressedFile(), and GuessFormat().

◆ m_FileName

wxString CCompressedFile::m_FileName
protected

Definition at line 82 of file compressed_file.hpp.

Referenced by CCompressedFile(), x_GetProtocol(), and x_GuessFormatNetwork().

◆ m_FileStream

unique_ptr<CNcbiIstream> CCompressedFile::m_FileStream
protected

Definition at line 84 of file compressed_file.hpp.

Referenced by CCompressedFile(), GetIstream(), Reset(), and x_AttachDecompressor().

◆ m_Istream

CNcbiIstream* CCompressedFile::m_Istream
protected

Definition at line 89 of file compressed_file.hpp.

Referenced by GetIstream(), Reset(), and x_AttachDecompressor().

◆ m_Protocol

EProtocol CCompressedFile::m_Protocol
protected

Definition at line 83 of file compressed_file.hpp.

Referenced by CCompressedFile(), and x_GuessFormatNetwork().

◆ m_TempFile

unique_ptr<CTmpFile> CCompressedFile::m_TempFile
protected

Definition at line 88 of file compressed_file.hpp.

Referenced by Reset(), and x_DownloadFile().

◆ m_Type

uint8_t CCompressedFile::m_Type
protected

The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:58:16 2024 by modify_doxy.py rev. 669887