libadc-cxx 1.0.0
Structured logging for scientific computing
Loading...
Searching...
No Matches
none.ipp
Go to the documentation of this file.
1/* Copyright 2025 NTESS. See the top-level LICENSE.txt file for details.
2 *
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
7
8namespace adc {
9
10
11/*! \brief Message suppression publisher; it quietly ignores all
12 publication requests.
13 */
14class none_plugin : public publisher_api {
15
16private:
17 const std::string vers;
18 const std::vector<std::string> tags;
19 std::map< const std::string, const std::string> none_defaults;
20
21public:
22 none_plugin() : vers("1.0.0") , tags({"none"}) { }
23
24 int publish(std::shared_ptr<builder_api> /* b */) {
25 return 0;
26 }
27
28 int config(const std::map< std::string, std::string >& /* m */) {
29 return 0;
30 }
31
32 int config(const std::map< std::string, std::string >& /* m */, std::string_view /* env_prefix */) {
33 return 0;
34 }
35
36 const std::map< const std::string, const std::string> & get_option_defaults() {
37 return none_defaults;
38 }
39
40 int initialize() {
41 return 0;
42 }
43
44 void finalize() {
45 }
46
47 void pause() {
48 }
49
50 void resume() {
51 }
52
53 std::string_view name() const {
54 return "none";
55 }
56
57 std::string_view version() const {
58 return vers;
59 }
60
62};
63
64
65} // adc
Message suppression publisher; it quietly ignores all publication requests.
Definition none.ipp:14
int config(const std::map< std::string, std::string > &)
Configure the plugin with the options given.
Definition none.ipp:28
std::string_view version() const
Definition none.ipp:57
void resume()
Resume publishing Duplicate calls are allowed.
Definition none.ipp:50
const std::map< const std::string, const std::string > & get_option_defaults()
Look up the settable options and their defaults.
Definition none.ipp:36
int initialize()
Ready the plugin to publish following the configuration options set or defaulted.
Definition none.ipp:40
int config(const std::map< std::string, std::string > &, std::string_view)
Configure the plugin with the options given and the corresponding environment variables.
Definition none.ipp:32
void pause()
Pause publishing until a call to resume. Duplicate calls are allowed.
Definition none.ipp:47
void finalize()
Stop publishing and release any resources held for managing publication.
Definition none.ipp:44
std::string_view name() const
Definition none.ipp:53
int publish(std::shared_ptr< builder_api >)
Publish the content of the builder.
Definition none.ipp:24
Publisher plugin interface.
Definition publisher.hpp:48
Definition adc.hpp:82