Jpp
Public Member Functions | Protected Attributes | List of all members
ogzstream Class Reference

#include <gzstream.h>

Inheritance diagram for ogzstream:
gzstreambase JLANG::JGZFileWriter< T >

Public Member Functions

 ogzstream ()
 
 ogzstream (const char *name, int mode=std::ios::out)
 
void open (const char *name, int open_mode=std::ios::out)
 
void close ()
 
gzstreambufrdbuf ()
 
bool is_open () const
 

Protected Attributes

gzstreambuf buf
 

Detailed Description

Definition at line 213 of file gzstream.h.

Constructor & Destructor Documentation

◆ ogzstream() [1/2]

ogzstream::ogzstream ( )
inline

Definition at line 215 of file gzstream.h.

215 : std::ostream( &buf) {}

◆ ogzstream() [2/2]

ogzstream::ogzstream ( const char *  name,
int  mode = std::ios::out 
)
inline

Definition at line 216 of file gzstream.h.

217  : gzstreambase( name, mode), std::ostream( &buf) {}

Member Function Documentation

◆ open()

void ogzstream::open ( const char *  name,
int  open_mode = std::ios::out 
)
inline

Definition at line 218 of file gzstream.h.

218  {
219  gzstreambase::open( name, open_mode);
220  }

◆ close()

void gzstreambase::close ( )
inlineinherited

Definition at line 185 of file gzstream.h.

185  {
186  if ( buf.is_open()) {
187  if ( ! buf.close())
188  clear( rdstate() | std::ios::badbit );
189  else
190  clear();
191  }
192  }

◆ rdbuf()

gzstreambuf* gzstreambase::rdbuf ( )
inlineinherited

Definition at line 193 of file gzstream.h.

193 { return &buf; }

◆ is_open()

bool gzstreambase::is_open ( ) const
inlineinherited

Definition at line 194 of file gzstream.h.

194 { return buf.is_open(); }

Member Data Documentation

◆ buf

gzstreambuf gzstreambase::buf
protectedinherited

Definition at line 169 of file gzstream.h.


The documentation for this class was generated from the following file:
gzstreambase::gzstreambase
gzstreambase()
Definition: gzstream.h:172
gzstreambuf::close
gzstreambuf * close()
Definition: gzstream.h:108
gzstreambase::buf
gzstreambuf buf
Definition: gzstream.h:169
gzstreambase::open
void open(const char *name, int open_mode)
Definition: gzstream.h:180
gzstreambuf::is_open
int is_open() const
Definition: gzstream.h:79