MFEM  v3.3
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
mfem::ofgzstream Class Reference

#include <gzstream.hpp>

Inheritance diagram for mfem::ofgzstream:
[legend]
Collaboration diagram for mfem::ofgzstream:
[legend]

Public Member Functions

 ofgzstream (char const *name, char const *mode=default_mode)
 
 ~ofgzstream ()
 

Static Public Attributes

static char const * default_mode = "zwb6"
 

Protected Attributes

std::streambuf * buf
 

Detailed Description

Definition at line 672 of file gzstream.hpp.

Constructor & Destructor Documentation

mfem::ofgzstream::ofgzstream ( char const *  name,
char const *  mode = default_mode 
)

Simple replacement for class std::ofstream that can transparently create files compressed in gzip format (when mode contains the character 'z') or regular uncompressed files. Internally, the classes std::filebuf or gzstreambuf are used to handle the file I/O. The mode chars are as in gzopen() with additional caveat that presence of a 'z' character indicates desire to compress. Default mode is "zwb6". Writing compressed files requires the MFEM build-time option MFEM_USE_GZSTREAM.

Note
For uncompressed files, the mode option is ignored and the file is opened with std::ios_base::out mode.
See Also
ifgzstream, https://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/zlib-gzopen-1.html.

Definition at line 240 of file gzstream.cpp.

mfem::ofgzstream::~ofgzstream ( )
inline

Definition at line 691 of file gzstream.hpp.

Member Data Documentation

std::streambuf* mfem::ofgzstream::buf
protected

Definition at line 694 of file gzstream.hpp.

char const * mfem::ofgzstream::default_mode = "zwb6"
static

Definition at line 675 of file gzstream.hpp.


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