DeflatedArchiveFile.h

Go to the documentation of this file.
00001 #ifndef DEFLATEDARCHIVEFILE_H_
00002 #define DEFLATEDARCHIVEFILE_H_
00003 
00004 #include "iarchive.h"
00005 #include "stream/filestream.h"
00006 #include "zlibstream.h"
00007 
00008 class DeflatedArchiveFile: public ArchiveFile
00009 {
00010         std::string m_name;
00011         FileInputStream m_istream;
00012         SubFileInputStream m_substream;
00013         DeflatedInputStream m_zipstream;
00014         FileInputStream::size_type m_size;
00015     public:
00016         typedef FileInputStream::size_type size_type;
00017         typedef FileInputStream::position_type position_type;
00018 
00019         DeflatedArchiveFile (const std::string& name, const std::string& archiveName, position_type position,
00020                 size_type stream_size, size_type file_size) :
00021             m_name(name), m_istream(archiveName), m_substream(m_istream, position, stream_size), m_zipstream(
00022                     m_substream), m_size(file_size)
00023         {
00024         }
00025 
00026         size_type size () const
00027         {
00028             return m_size;
00029         }
00030         const std::string getName () const
00031         {
00032             return m_name;
00033         }
00034         InputStream& getInputStream ()
00035         {
00036             return m_zipstream;
00037         }
00038 };
00039 
00040 #endif /* DEFLATEDARCHIVEFILE_H_ */

Generated by  doxygen 1.6.2