From 36214831e981e5cd33fe6f2e524883b4f5e7eff5 Mon Sep 17 00:00:00 2001
From: Christoph Kampmeyer <christoph.kampmeyer@desy.de>
Date: Mon, 20 Jan 2020 10:39:51 +0100
Subject: [PATCH] ExceptionHandlingDecorator:

  - Cleaned up comments
  - Place using-declaration of buffer_2D to class definition so the base
    class name can be omitted in the implementation
---
 include/ExceptionHandlingDecorator.h | 9 +++++----
 src/ExceptionHandlingDecorator.cc    | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/ExceptionHandlingDecorator.h b/include/ExceptionHandlingDecorator.h
index 995fbc92..cc969178 100644
--- a/include/ExceptionHandlingDecorator.h
+++ b/include/ExceptionHandlingDecorator.h
@@ -18,15 +18,15 @@ namespace ChimeraTK {
   template<typename UserType>
   class ExceptionHandlingDecorator : public ChimeraTK::NDRegisterAccessorDecorator<UserType> {
    public:
-//    ExceptionHandlingDecorator(
-//        boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> accessor, DeviceModule& devMod,
-//        boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> recoveryAccessor=nullptr);
 
     /// Basic constructor, inititalizes the base decorator and the reference to the DeviceModule
     ExceptionHandlingDecorator(
         boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> accessor, DeviceModule& devMod);
 
-    /// Constructor for writeable registers, allows also setting the recoveryAccessor
+    /**
+     * Constructor for writeable registers, allows also setting the recoveryAccessor.
+     * Deletgates to the basic contructor for member initialization.
+     */
     ExceptionHandlingDecorator(
         boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> accessor, DeviceModule& devMod,
         boost::shared_ptr<ChimeraTK::NDRegisterAccessor<UserType>> recoveryAccessor);
@@ -57,6 +57,7 @@ namespace ChimeraTK {
     void interrupt() override;
 
    protected:
+    using ChimeraTK::NDRegisterAccessor<UserType>::buffer_2D;
     DeviceModule& dm;
     DataValidity validity{DataValidity::ok};
     bool genericTransfer(std::function<bool(void)> callable);
diff --git a/src/ExceptionHandlingDecorator.cc b/src/ExceptionHandlingDecorator.cc
index d9378c84..d127e93d 100644
--- a/src/ExceptionHandlingDecorator.cc
+++ b/src/ExceptionHandlingDecorator.cc
@@ -113,7 +113,7 @@ namespace ChimeraTK {
 
       // Access to _recoveryAccessor is only possible channel-wise
       for(unsigned int ch=0; ch<_recoveryAccessor->getNumberOfChannels(); ++ch){
-       _recoveryAccessor->accessChannel(ch) = NDRegisterAccessorDecorator<UserType>::buffer_2D[ch];
+        _recoveryAccessor->accessChannel(ch) = buffer_2D[ch];
       }
     }
     // Now delegate call to the generic decorator, which swaps the buffer
-- 
GitLab