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

#include <gzstream.hpp>

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

Public Member Functions

 ifgzstream (char const *name, char const *mode="rb")
 
 ~ifgzstream ()
 

Static Protected Member Functions

static bool maybe_gz (const char *fn)
 

Protected Attributes

std::streambuf * buf
 

Detailed Description

Definition at line 632 of file gzstream.hpp.

Constructor & Destructor Documentation

mfem::ifgzstream::ifgzstream ( char const *  name,
char const *  mode = "rb" 
)

Simple replacement for class std::ifstream that automatically detects compressed files in gzip format and transparently uncompresses them. Internally, the classes std::filebuf or gzstreambuf are used to handle the file I/O. Reading 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::in mode.
See Also
ofgzstream, https://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/zlib-gzopen-1.html.

Definition at line 202 of file gzstream.cpp.

mfem::ifgzstream::~ifgzstream ( )
inline

Definition at line 645 of file gzstream.hpp.

Member Function Documentation

bool mfem::ifgzstream::maybe_gz ( const char *  fn)
staticprotected

Definition at line 193 of file gzstream.cpp.

Member Data Documentation

std::streambuf* mfem::ifgzstream::buf
protected

Definition at line 648 of file gzstream.hpp.


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