8 |
|
|
9 |
namespace zipios { |
namespace zipios { |
10 |
|
|
11 |
ZipInputStream::ZipInputStream( istream &is, streampos pos ) |
ZipInputStream::ZipInputStream( std::istream &is, std::streampos pos ) |
12 |
: istream( 0 ), |
: std::istream( 0 ), |
13 |
// SGIs basic_ifstream calls istream with 0, but calls basic_ios constructor first?? |
// SGIs basic_ifstream calls istream with 0, but calls basic_ios constructor first?? |
14 |
ifs( 0 ) |
ifs( 0 ) |
15 |
{ |
{ |
18 |
this->init( izf ) ; |
this->init( izf ) ; |
19 |
} |
} |
20 |
|
|
21 |
ZipInputStream::ZipInputStream( const string &filename, streampos pos ) |
ZipInputStream::ZipInputStream( const std::string &filename, std::streampos pos ) |
22 |
: istream( 0 ), |
: std::istream( 0 ), |
23 |
ifs( 0 ) |
ifs( 0 ) |
24 |
{ |
{ |
25 |
ifs = new ifstream( filename.c_str(), ios::in | ios::binary ) ; |
ifs = new std::ifstream( filename.c_str(), std::ios::in |std:: ios::binary ) ; |
26 |
izf = new ZipInputStreambuf( ifs->rdbuf(), pos ) ; |
izf = new ZipInputStreambuf( ifs->rdbuf(), pos ) ; |
27 |
// this->rdbuf( izf ) ; is replaced by: |
// this->rdbuf( izf ) ; is replaced by: |
28 |
this->init( izf ) ; |
this->init( izf ) ; |