Module: check_mk
Branch: master
Commit: 3e95438201a7b15db7ffa77a42ceacf6b7776e96
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e95438201a7b1…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Mon Nov 27 08:47:39 2017 +0100
Refactoring: Replace conditional with polymorphism.
This kills yet another enum/switch combo, making things more "OO" and moving
things where they belong, see:
https://refactoring.com/catalog/replaceConditionalWithPolymorphism.html
Change-Id: Ibff6276cf7a27f1018f19b5fe43425c26f624a04
---
livestatus/src/Aggregator.h | 68 ++----------------
livestatus/src/BlobColumn.cc | 2 +-
livestatus/src/BlobColumn.h | 3 +-
livestatus/src/Column.h | 7 +-
livestatus/src/CustomVarsDictColumn.cc | 3 +-
livestatus/src/CustomVarsDictColumn.h | 3 +-
livestatus/src/DoubleAggregator.h | 10 +--
livestatus/src/DoubleColumn.cc | 4 +-
livestatus/src/DoubleColumn.h | 3 +-
livestatus/src/IntAggregator.h | 10 +--
livestatus/src/IntColumn.cc | 4 +-
livestatus/src/IntColumn.h | 3 +-
livestatus/src/ListColumn.cc | 2 +-
livestatus/src/ListColumn.h | 3 +-
livestatus/src/NullColumn.cc | 2 +-
livestatus/src/NullColumn.h | 3 +-
livestatus/src/OffsetPerfdataColumn.cc | 4 +-
livestatus/src/OffsetPerfdataColumn.h | 4 +-
livestatus/src/PerfdataAggregator.cc | 7 +-
livestatus/src/PerfdataAggregator.h | 11 +--
livestatus/src/Query.cc | 127 ++++++++++++++++++++++++++++++---
livestatus/src/StatsColumn.cc | 6 +-
livestatus/src/StatsColumn.h | 8 +--
livestatus/src/StringColumn.cc | 2 +-
livestatus/src/StringColumn.h | 3 +-
livestatus/src/TimeAggregator.h | 10 +--
livestatus/src/TimeColumn.cc | 4 +-
livestatus/src/TimeColumn.h | 3 +-
tests/check_mk.imp | 1 +
29 files changed, 184 insertions(+), 136 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3e95438201…