MFEM  v4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public 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 &out)
 Construct an OutStream from the given stream out, by using its rdbuf(). More...
 
void SetStream (std::ostream &out)
 Replace the rdbuf() and tie() of the OutStream with that of out, enabling output. More...
 
void Enable ()
 Enable output. More...
 
void Disable ()
 Disable output. More...
 
bool IsEnabled () const
 Check if output is enabled. More...
 

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

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

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

Definition at line 40 of file globals.hpp.

Member Function Documentation

void mfem::OutStream::Disable ( )
inline

Disable output.

Definition at line 52 of file globals.hpp.

void mfem::OutStream::Enable ( )
inline

Enable output.

Definition at line 50 of file globals.hpp.

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

Check if output is enabled.

Definition at line 57 of file globals.hpp.

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

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

Definition at line 44 of file globals.hpp.

Member Data Documentation

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

Definition at line 33 of file globals.hpp.

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 file: