MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
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().
 
void SetStream (std::ostream &os)
 Replace the rdbuf() and tie() of the OutStream with that of os, enabling output.
 
void Enable ()
 Enable output.
 
void Disable ()
 Disable output.
 
bool IsEnabled () const
 Check if output is enabled.
 

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: