Gowdy solver
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SLog Struct Reference

SLog enables writing both to cerr and cout simultaneously. More...

#include <slog.h>

Public Member Functions

 SLog ()
SLogoperator<< (std::ostream &(*pfun)(std::ostream &))

Data Fields

bool tty

Detailed Description

SLog enables writing both to cerr and cout simultaneously.

Definition at line 13 of file slog.h.


Constructor & Destructor Documentation

SLog::SLog ( ) [inline]

Definition at line 17 of file slog.h.

References tty.

            {
        struct stat buf;
        tty = fstat( _fileno( stderr ), &buf ) >= 0
              && (buf.st_mode & S_IFMT) == S_IFCHR;
    }

Member Function Documentation

SLog& SLog::operator<< ( std::ostream &(*)(std::ostream &)  pfun) [inline]

Definition at line 23 of file slog.h.

References tty.

    {
        pfun( std::cerr );
        if ( ! tty ) pfun( std::cout );
        return *this;
    }

Field Documentation

bool SLog::tty

Definition at line 15 of file slog.h.

Referenced by operator<<(), operator<<(), and SLog().


The documentation for this struct was generated from the following file: