summaryrefslogtreecommitdiff
path: root/controller
diff options
context:
space:
mode:
Diffstat (limited to 'controller')
-rw-r--r--controller/JSONDB.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/controller/JSONDB.hpp b/controller/JSONDB.hpp
index 61735655..a9a5e6ac 100644
--- a/controller/JSONDB.hpp
+++ b/controller/JSONDB.hpp
@@ -88,6 +88,9 @@ public:
}
}
+ inline bool operator==(const JSONDB &db) const { return ((_basePath == db._basePath)&&(_db == db._db)); }
+ inline bool operator!=(const JSONDB &db) const { return (!(*this == db)); }
+
private:
void _reload(const std::string &p);
bool _isValidObjectName(const std::string &n);
@@ -98,6 +101,9 @@ private:
nlohmann::json obj;
uint64_t lastModifiedOnDisk;
uint64_t lastCheck;
+
+ inline bool operator==(const _E &e) const { return (obj == e.obj); }
+ inline bool operator!=(const _E &e) const { return (obj != e.obj); }
};
std::string _basePath;