nx_server_plugin_sdk 1.0 Server Plugin SDK

integration_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_integration_diagnostic_event.h>
9
10 namespace nx::sdk {
11
12 class IntegrationDiagnosticEvent: public RefCountable<IIntegrationDiagnosticEvent>
13 {
14 public:
15 IntegrationDiagnosticEvent(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(IIntegrationDiagnosticEvent::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::IntegrationDiagnosticEvent
Definition: integration_diagnostic_event.h:12
nx::sdk::IntegrationDiagnosticEvent::toString
std::string toString() const
Definition: integration_diagnostic_event.cpp:64
nx::sdk
Definition: device_agent.h:12
nx::sdk::RefCountable
Definition: ref_countable.h:83