Flow123d  master-1fea4ce
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
StreamMask Class Reference

Helper class, store mask specifying streams. More...

#include <logger.hh>

Collaboration diagram for StreamMask:
Collaboration graph
[legend]

Public Member Functions

 StreamMask ()
 Empty constructor. More...
 
 StreamMask (int mask)
 Constructor set mask_ value. More...
 
StreamMask operator& (const StreamMask &other)
 
StreamMask operator| (const StreamMask &other)
 
int operator() (void)
 

Static Public Attributes

static StreamMask cout = StreamMask(0b00000001)
 Predefined mask of std::cout output. More...
 
static StreamMask cerr = StreamMask(0b00000010)
 Predefined mask of std::cerr output. More...
 
static StreamMask log = StreamMask(0b00000100)
 Predefined mask of log file output. More...
 

Private Attributes

int mask_
 

Detailed Description

Helper class, store mask specifying streams.

Defines masks of all used streams as static methods and allows combining and comparing masks using the overloaded operators.

Definition at line 41 of file logger.hh.

Constructor & Destructor Documentation

◆ StreamMask() [1/2]

StreamMask::StreamMask ( )
inline

Empty constructor.

Definition at line 44 of file logger.hh.

Here is the caller graph for this function:

◆ StreamMask() [2/2]

StreamMask::StreamMask ( int  mask)
inline

Constructor set mask_ value.

Definition at line 48 of file logger.hh.

Member Function Documentation

◆ operator&()

StreamMask StreamMask::operator& ( const StreamMask other)

Definition at line 43 of file logger.cc.

◆ operator()()

int StreamMask::operator() ( void  )

Definition at line 53 of file logger.cc.

◆ operator|()

StreamMask StreamMask::operator| ( const StreamMask other)

Definition at line 48 of file logger.cc.

Member Data Documentation

◆ cerr

StreamMask StreamMask::cerr = StreamMask(0b00000010)
static

Predefined mask of std::cerr output.

Definition at line 55 of file logger.hh.

◆ cout

StreamMask StreamMask::cout = StreamMask(0b00000001)
static

Predefined mask of std::cout output.

Definition at line 52 of file logger.hh.

◆ log

StreamMask StreamMask::log = StreamMask(0b00000100)
static

Predefined mask of log file output.

Definition at line 58 of file logger.hh.

◆ mask_

int StreamMask::mask_
private

Definition at line 70 of file logger.hh.


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