MFEM  v4.6.0
Finite element discretization library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mfem::OutStream Class Reference

Simple extension of std::ostream. More...

#include <globals.hpp>

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

Public Member Functions

 OutStream (std::ostream &os)
 Construct an OutStream from the given stream os, by using its rdbuf(). More...
 
void SetStream (std::ostream &os)
 Replace the rdbuf() and tie() of the OutStream with that of os, enabling output. More...
 
void Enable ()
 Enable output. More...
 
void Disable ()
 Disable output. More...
 
bool IsEnabled () const
 Check if output is enabled. More...
 

Protected Member Functions

void Init ()
 

Protected Attributes

std::streambuf * m_rdbuf
 
std::ostream * m_tie
 

Detailed Description

Simple extension of std::ostream.

This class adds the ability to enable and disable the stream. The associated std::streambuf and tied std::ostream can be replaced with that of any std::ostream.

Definition at line 29 of file globals.hpp.

Constructor & Destructor Documentation

◆ OutStream()

mfem::OutStream::OutStream ( std::ostream &  os)
inline

Construct an OutStream from the given stream os, by using its rdbuf().

Definition at line 42 of file globals.hpp.

Member Function Documentation

◆ Disable()

void mfem::OutStream::Disable ( )
inline

Disable output.

Definition at line 54 of file globals.hpp.

◆ Enable()

void mfem::OutStream::Enable ( )
inline

Enable output.

Definition at line 52 of file globals.hpp.

◆ Init()

void mfem::OutStream::Init ( )
protected

Definition at line 31 of file globals.cpp.

◆ IsEnabled()

bool mfem::OutStream::IsEnabled ( ) const
inline

Check if output is enabled.

Definition at line 59 of file globals.hpp.

◆ SetStream()

void mfem::OutStream::SetStream ( std::ostream &  os)
inline

Replace the rdbuf() and tie() of the OutStream with that of os, enabling output.

Definition at line 46 of file globals.hpp.

Member Data Documentation

◆ m_rdbuf

std::streambuf* mfem::OutStream::m_rdbuf
protected

Definition at line 33 of file globals.hpp.

◆ m_tie

std::ostream* mfem::OutStream::m_tie
protected

Definition at line 35 of file globals.hpp.


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