ATLAS Offline Software
Loading...
Searching...
No Matches
MessagePrinterOverlay.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8
9#ifndef ASG_MESSAGING__MESSAGE_PRINTER_OVERLAY_H
10#define ASG_MESSAGING__MESSAGE_PRINTER_OVERLAY_H
11
12namespace asg
13{
14 class IMessagePrinter;
15
27
29 {
30 //
31 // public interface
32 //
33
36
37
42 public:
43 MessagePrinterOverlay (IMessagePrinter *val_printer) noexcept;
44
48 public:
49 ~MessagePrinterOverlay () noexcept;
50
54 public:
55 static IMessagePrinter& current () noexcept;
56
57
58
59 //
60 // private interface
61 //
62
68 private:
69 static IMessagePrinter*& getCurrent () noexcept;
70
72 private:
73 IMessagePrinter *m_saved = nullptr;
74
76 private:
77 IMessagePrinter *m_current = nullptr;
78 };
79}
80
81#endif
static IMessagePrinter & current() noexcept
get the current IMessagePrinter
~MessagePrinterOverlay() noexcept
remove the currently overlaid printer
IMessagePrinter * m_current
the current message printer we should have when we restore
IMessagePrinter * m_saved
the stored message printer we need to restore
MessagePrinterOverlay(MessagePrinterOverlay &)=delete
MessagePrinterOverlay operator=(MessagePrinterOverlay &)=delete
static IMessagePrinter *& getCurrent() noexcept
get a reference to the pointer to the current IMessagePrinter
#define private