Rizin
unix-like reverse engineering framework and cli tools
gzfilestream_common Class Reference

#include <zfstream.h>

Inheritance diagram for gzfilestream_common:
gzifstream gzofstream

Public Member Functions

virtual ~gzfilestream_common ()
 
void attach (int fd, int io_mode)
 
void open (const char *name, int io_mode)
 
void close ()
 

Protected Member Functions

 gzfilestream_common ()
 

Private Member Functions

gzfilebufrdbuf ()
 

Private Attributes

gzfilebuf buffer
 

Friends

class gzifstream
 
class gzofstream
 
gzofstreamsetcompressionlevel (gzofstream &, int)
 
gzofstreamsetcompressionstrategy (gzofstream &, int)
 

Detailed Description

Definition at line 44 of file zfstream.h.

Constructor & Destructor Documentation

◆ ~gzfilestream_common()

gzfilestream_common::~gzfilestream_common ( )
virtual

Definition at line 258 of file zfstream.cpp.

259 { }

◆ gzfilestream_common()

gzfilestream_common::gzfilestream_common ( )
protected

Definition at line 254 of file zfstream.cpp.

254  :
256 { }
gzfilebuf * rdbuf()
Definition: zfstream.cpp:286

Member Function Documentation

◆ attach()

void gzfilestream_common::attach ( int  fd,
int  io_mode 
)

Definition at line 261 of file zfstream.cpp.

261  {
262 
263  if ( !buffer.attach( fd, io_mode) )
264  clear( ios::failbit | ios::badbit );
265  else
266  clear();
267 
268 }
Definition: buffer.h:15
static const z80_opcode fd[]
Definition: z80_tab.h:997

References fd.

Referenced by gzifstream::gzifstream(), and gzofstream::gzofstream().

◆ close()

void gzfilestream_common::close ( )

Definition at line 279 of file zfstream.cpp.

279  {
280 
281  if ( !buffer.close() )
282  clear( ios::failbit | ios::badbit );
283 
284 }

◆ open()

void gzfilestream_common::open ( const char *  name,
int  io_mode 
)

Definition at line 270 of file zfstream.cpp.

270  {
271 
272  if ( !buffer.open( name, io_mode ) )
273  clear( ios::failbit | ios::badbit );
274  else
275  clear();
276 
277 }
Definition: z80asm.h:102

Referenced by gzifstream::gzifstream(), and gzofstream::gzofstream().

◆ rdbuf()

gzfilebuf * gzfilestream_common::rdbuf ( )
private

Definition at line 286 of file zfstream.cpp.

287 {
288  return &buffer;
289 }
gzfilebuf buffer
Definition: zfstream.h:64

References buffer.

Friends And Related Function Documentation

◆ gzifstream

friend class gzifstream
friend

Definition at line 46 of file zfstream.h.

◆ gzofstream

friend class gzofstream
friend

Definition at line 47 of file zfstream.h.

◆ setcompressionlevel

gzofstream& setcompressionlevel ( gzofstream s,
int  l 
)
friend

Definition at line 106 of file zfstream.h.

107 {
108  (s.rdbuf())->setcompressionlevel(l);
109  return s;
110 }
friend gzofstream & setcompressionlevel(gzofstream &, int)
Definition: zfstream.h:106
static RzSocket * s
Definition: rtr.c:28

◆ setcompressionstrategy

gzofstream& setcompressionstrategy ( gzofstream s,
int  l 
)
friend

Definition at line 112 of file zfstream.h.

113 {
114  (s.rdbuf())->setcompressionstrategy(l);
115  return s;
116 }
friend gzofstream & setcompressionstrategy(gzofstream &, int)
Definition: zfstream.h:112

Member Data Documentation

◆ buffer

gzfilebuf gzfilestream_common::buffer
private

Definition at line 64 of file zfstream.h.

Referenced by rdbuf().


The documentation for this class was generated from the following files: