diff Framework/Messages/IObserver.h @ 1273:398ea4259e65

merge
author Alain Mazy <alain@mazy.be>
date Mon, 03 Feb 2020 14:57:22 +0100
parents 2d8ab34c8c91
children 7ec8fea061b9
line wrap: on
line diff
--- a/Framework/Messages/IObserver.h	Mon Feb 03 14:56:56 2020 +0100
+++ b/Framework/Messages/IObserver.h	Mon Feb 03 14:57:22 2020 +0100
@@ -2,7 +2,7 @@
  * Stone of Orthanc
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
- * Copyright (C) 2017-2019 Osimis S.A., Belgium
+ * Copyright (C) 2017-2020 Osimis S.A., Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
@@ -23,24 +23,28 @@
 
 #include "MessageBroker.h"
 
+#include <stdint.h>
+
 namespace OrthancStone 
 {
   class IObserver : public boost::noncopyable
   {
   private:
     MessageBroker&  broker_;
-    // the following is a UUID that is used to disambiguate different observers
-    // that may have the same address
-    char     fingerprint_[37];
+    // the following is a int64_t with some checks that is used to 
+    // disambiguate different observers that may have the same address
+    int64_t     fingerprint_[3];
+
+    void AssignFingerprint();
 
   public:
     IObserver(MessageBroker& broker);
 
     virtual ~IObserver();
 
-    const char* GetFingerprint() const
+    int64_t GetFingerprint() const
     {
-      return fingerprint_;
+      return fingerprint_[0];
     }
 
     bool DoesFingerprintLookGood() const;