]> git.stg.codes - stg.git/blobdiff - include/stg/notifer.h
Simplify notifiers.
[stg.git] / include / stg / notifer.h
index 367c5ced998a111618d7d7aa9259905a8057be01..339b6170e1ae78514bf17dc206a60567dff7252b 100644 (file)
@@ -3,20 +3,15 @@
 namespace STG
 {
 
-template <typename T>
-struct PropertyNotifierBase
-{
-    virtual ~PropertyNotifierBase() = default;
-
-    virtual void Notify(const T& oldValue, const T& newValue) = 0;
-};
-
-template <typename T>
+template <typename... Ts>
 struct NotifierBase
 {
     virtual ~NotifierBase() = default;
 
-    virtual void Notify(const T& value) = 0;
+    virtual void notify(const Ts&... values) = 0;
 };
 
+template <typename T>
+using PropertyNotifierBase = NotifierBase<T, T>;
+
 }