ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
reportwriter.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of module \alib_alox of the \aliblong.
4///
5/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
6/// Published under \ref mainpage_license "Boost Software License".
7//==================================================================================================
8
9#ifndef HPP_ALIB_ALOX_REPORT_WRITER
10#define HPP_ALIB_ALOX_REPORT_WRITER 1
11#pragma once
13namespace alib { namespace lox {
14
15class Lox;
16
17//==================================================================================================
18/// The \b %ReportWriter for \alib when using \alox. An instance of this class is created
19/// in method \ref alib::lox::Log::AddDebugLogger "Log::AddDebugLogger"
20/// and registered with \alib.<br>
21/// Uses internal domain <c>'$/REPORT'</c> for logging.
22//==================================================================================================
24{
25 protected:
26 /// The \b Lox to report to.
28
29 /// The internal domain to report into.
31
32 public:
33 //==============================================================================================
34 /// Constructs an \b %AloxReportWriter.
35 /// @param lox The \b Lox to report to.
36 //==============================================================================================
39
40 //==============================================================================================
41 /// Virtual destructor
42 //==============================================================================================
43 virtual ~ALoxReportWriter() override {}
44
45 //==============================================================================================
46 /// Notify activation/deactivation
47 //==============================================================================================
48 virtual void NotifyActivation ( lang::Phase ) override {}
49
50
51 //==============================================================================================
52 /// Write \alib reports using \alox.
53 /// @param msg The message to log.
54 //==============================================================================================
55 virtual void Report ( lang::Message& msg ) override;
56
57 //==============================================================================================
58 /// Returns the domain used to write reports.
59 /// @return The report log domain.
60 //==============================================================================================
62 static NString& LogDomain();
63};// class ALoxReportWriter
64
65} // namespace alib[::lox]
66
67/// Type alias in namespace \b alib.
69
70} // namespace [alib]
71
72#endif // HPP_ALIB_ALOX_REPORT_WRITER
73
virtual ~ALoxReportWriter() override
Virtual destructor.
Lox * lox
The Lox to report to.
virtual void Report(lang::Message &msg) override
virtual void NotifyActivation(lang::Phase) override
Notify activation/deactivation.
static ALIB_API NString & LogDomain()
static NString16 reportDomain
The internal domain to report into.
This class acts as a container for Loggers and provides a convenient interface to logging.
Definition lox.inl:58
#define ALIB_API
Definition alib.hpp:639
Phase
Denotes a phase, e.g.,of a transaction.
Definition alib.cpp:69
lox::ALoxReportWriter ALoxReportWriter
Type alias in namespace alib.
lox::Lox Lox
Type alias in namespace alib.
Definition lox.inl:1449