Module: check_mk
Branch: master
Commit: 12a5a9256c2f06c8db6592afcd76901db4fe485e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=12a5a9256c2f06…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Thu Mar 22 16:12:36 2018 +0100
Added a TODO.
Change-Id: I4f31acc321936b36ac60c9eaa67b157e292bc7db
---
livestatus/src/Filter.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/livestatus/src/Filter.h b/livestatus/src/Filter.h
index 0253cb9..88f3f66 100644
--- a/livestatus/src/Filter.h
+++ b/livestatus/src/Filter.h
@@ -55,6 +55,12 @@ public:
std::chrono::seconds timezone_offset) const = 0;
virtual std::unique_ptr<Filter> partialFilter(
std::function<bool(const Column &)> predicate) const = 0;
+
+ // TODO(sp) We might be able to unify all the methods below if we make the
+ // underlying lattice structure explicit, i.e. provide a set type and
+ // corresponding meet/join operations. Perhaps we can even get rid of the
+ // std::optional by making the lattice bounded, i.e. by providing bottom/top
+ // values.
virtual std::optional<std::string> stringValueRestrictionFor(
const std::string &column_name) const;
virtual std::optional<int32_t> greatestLowerBoundFor(
@@ -66,6 +72,7 @@ public:
virtual std::optional<std::bitset<32>> valueSetLeastUpperBoundFor(
const std::string &column_name,
std::chrono::seconds timezone_offset) const;
+
virtual std::unique_ptr<Filter> copy() const = 0;
virtual std::unique_ptr<Filter> negate() const = 0;