nx_metadata_sdk 1.0 Metadata SDK

plugin_diagnostic_event.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <string>
6
7 #include <nx/sdk/helpers/ref_countable.h>
8 #include <nx/sdk/i_plugin_diagnostic_event.h>
9
10 namespace nx::sdk {
11
12 class PluginDiagnosticEvent: public RefCountable<IPluginDiagnosticEvent>
13 {
14 public:
15 PluginDiagnosticEvent(Level level, std::string caption, std::string description);
16
17 virtual Level level() const override;
18 virtual const char* caption() const override;
19 virtual const char* description() const override;
20
21 void setLevel(IPluginDiagnosticEvent::Level level);
22 void setCaption(std::string caption);
23 void setDescription(std::string description);
24
26 std::string toString() const;
27
28 private:
29 Level m_level = Level::info;
30 std::string m_caption;
31 std::string m_description;
32 };
33
34 } // namespace nx::sdk
nx::sdk::PluginDiagnosticEvent
Definition: plugin_diagnostic_event.h:12
nx::sdk
Definition: device_agent.h:12
nx::sdk::PluginDiagnosticEvent::toString
std::string toString() const
Definition: plugin_diagnostic_event.cpp:62
nx::sdk::RefCountable
Definition: ref_countable.h:83