Module: check_mk
Branch: master
Commit: 352cd23abee1c29ade92a34e46f3238e43034165
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=352cd23abee1c2…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Fri Apr 6 11:20:26 2018 +0200
Win-agent: rename ISectionHeader to SectionHeaderBase
Move away from Microsoft-style naming in an abstract base class not
defined by Microsoft.
---
agents/windows/build_version | 2 +-
agents/windows/sections/Section.cc | 2 +-
agents/windows/sections/Section.h | 6 +++---
agents/windows/sections/SectionGroup.cc | 6 +++---
agents/windows/sections/SectionHeader.h | 14 +++++++-------
agents/windows/sections/SectionPluginGroup.cc | 3 ++-
agents/windows/sections/SectionWMI.cc | 6 +++---
7 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/agents/windows/build_version b/agents/windows/build_version
index b4732da..28206c2 100644
--- a/agents/windows/build_version
+++ b/agents/windows/build_version
@@ -1 +1 @@
-3220
+3222
diff --git a/agents/windows/sections/Section.cc b/agents/windows/sections/Section.cc
index 1509c3a..a1857cc 100644
--- a/agents/windows/sections/Section.cc
+++ b/agents/windows/sections/Section.cc
@@ -30,7 +30,7 @@
Section::Section(const std::string &configName, const Environment &env,
Logger *logger, const WinApiInterface &winapi,
- std::unique_ptr<ISectionHeader> header)
+ std::unique_ptr<SectionHeaderBase> header)
: _configName(configName)
, _env(env)
, _logger(logger)
diff --git a/agents/windows/sections/Section.h b/agents/windows/sections/Section.h
index 2b7b85c..7f9975d 100644
--- a/agents/windows/sections/Section.h
+++ b/agents/windows/sections/Section.h
@@ -37,7 +37,7 @@
class Environment;
class Logger;
-class ISectionHeader;
+class SectionHeaderBase;
namespace section_helpers {
@@ -55,7 +55,7 @@ class Section {
public:
Section(const std::string &configName, const Environment &env,
Logger *logger, const WinApiInterface &winapi,
- std::unique_ptr<ISectionHeader> header);
+ std::unique_ptr<SectionHeaderBase> header);
virtual ~Section();
@@ -87,7 +87,7 @@ private:
bool generateOutput(std::string &buffer,
const std::optional<std::string> &remoteIP);
- std::unique_ptr<ISectionHeader> _header;
+ std::unique_ptr<SectionHeaderBase> _header;
};
#endif // Section_h
diff --git a/agents/windows/sections/SectionGroup.cc
b/agents/windows/sections/SectionGroup.cc
index 65dfc75..42712b9 100644
--- a/agents/windows/sections/SectionGroup.cc
+++ b/agents/windows/sections/SectionGroup.cc
@@ -28,9 +28,9 @@
namespace {
-std::unique_ptr<ISectionHeader> makeHeader(bool show_header,
- const std::string &outputName,
- Logger *logger) {
+std::unique_ptr<SectionHeaderBase> makeHeader(bool show_header,
+ const std::string &outputName,
+ Logger *logger) {
if (show_header)
return std::make_unique<SectionHeader<',',
SectionBrackets>>(outputName,
logger);
diff --git a/agents/windows/sections/SectionHeader.h
b/agents/windows/sections/SectionHeader.h
index 9037258..3eeccb6 100644
--- a/agents/windows/sections/SectionHeader.h
+++ b/agents/windows/sections/SectionHeader.h
@@ -59,18 +59,18 @@ struct SubSectionBrackets {
static constexpr auto right = "]";
};
-class ISectionHeader {
+class SectionHeaderBase {
public:
- ISectionHeader() = default;
- ISectionHeader(const ISectionHeader &) = delete;
- virtual ~ISectionHeader() = default;
- ISectionHeader &operator=(const ISectionHeader &) = delete;
+ SectionHeaderBase() = default;
+ SectionHeaderBase(const SectionHeaderBase &) = delete;
+ virtual ~SectionHeaderBase() = default;
+ SectionHeaderBase &operator=(const SectionHeaderBase &) = delete;
virtual std::ostream &output(std::ostream &os) const = 0;
};
template <unsigned char SepChar, class Brackets>
-class SectionHeader : public ISectionHeader {
+class SectionHeader : public SectionHeaderBase {
public:
SectionHeader(const std::string &name, Logger *logger)
: _name(name), _logger(logger) {}
@@ -98,7 +98,7 @@ public:
};
inline std::ostream &operator<<(std::ostream &os,
- const ISectionHeader &header) {
+ const SectionHeaderBase &header) {
return header.output(os);
}
diff --git a/agents/windows/sections/SectionPluginGroup.cc
b/agents/windows/sections/SectionPluginGroup.cc
index 3b75e7c..b51a850 100644
--- a/agents/windows/sections/SectionPluginGroup.cc
+++ b/agents/windows/sections/SectionPluginGroup.cc
@@ -202,7 +202,8 @@ ScriptWorkerThread(LPVOID lpParam) {
return 0;
}
-std::unique_ptr<ISectionHeader> makeHeader(script_type type, Logger *logger) {
+std::unique_ptr<SectionHeaderBase> makeHeader(script_type type,
+ Logger *logger) {
if (type != script_type::PLUGIN)
return std::make_unique<DefaultHeader>(typeToSection(type), logger);
else // plugin -> no collective header
diff --git a/agents/windows/sections/SectionWMI.cc
b/agents/windows/sections/SectionWMI.cc
index 2c66a12..56c8b9a 100644
--- a/agents/windows/sections/SectionWMI.cc
+++ b/agents/windows/sections/SectionWMI.cc
@@ -37,9 +37,9 @@
namespace {
-std::unique_ptr<ISectionHeader> makeHeader(bool subSection,
- const std::string &outputName,
- Logger *logger) {
+std::unique_ptr<SectionHeaderBase> makeHeader(bool subSection,
+ const std::string &outputName,
+ Logger *logger) {
if (subSection)
return std::make_unique<SubSectionHeader>(outputName, logger);
else