ATLAS Offline Software
Loading...
Searching...
No Matches
AsgMessagingForward.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#ifndef ASG_MESSAGING_ASG_MESSAGING_FORWARD_H
9#define ASG_MESSAGING_ASG_MESSAGING_FORWARD_H
10
11// Local include(s):
14
15#include <functional>
16
17namespace asg
18{
27
29 {
30 //
31 // public interface
32 //
33
38 public:
39 template<typename T> explicit AsgMessagingForward( T *owner );
40
41
48 bool msgLvl( const MSG::Level lvl ) const;
49
54 MsgStream& msg() const;
55
61 MsgStream& msg( const MSG::Level lvl ) const;
62
63
64
65 //
66 // private interface
67 //
68
76 private:
77 std::function<MsgStream& ()> m_msg;
78 };
79
80
81
82 template<typename T> AsgMessagingForward ::
83 AsgMessagingForward( T *owner )
84 : m_msg ([owner] () -> MsgStream& {return owner->msg();})
85 {}
86}
87
88#endif
std::function< MsgStream &()> m_msg
the message stream we use
bool msgLvl(const MSG::Level lvl) const
Test the output level of the object.
MsgStream & msg() const
The standard message stream.
AsgMessagingForward(T *owner)
forwarding constructor