Skip to content
Snippets Groups Projects
Commit c8e06333 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

removed assignment and copy/move operations since they are removed in the base class as well

parent c6a2e4ba
No related branches found
No related tags found
No related merge requests found
...@@ -22,14 +22,7 @@ namespace ChimeraTK { ...@@ -22,14 +22,7 @@ namespace ChimeraTK {
class TestDecoratorTransferFuture : public TransferFuture { class TestDecoratorTransferFuture : public TransferFuture {
public: public:
TestDecoratorTransferFuture() : _originalFuture{nullptr} {} TestDecoratorTransferFuture() : _originalFuture{nullptr}, _accessor{nullptr} {}
TestDecoratorTransferFuture(TransferFuture &originalFuture, TestDecoratorRegisterAccessor<UserType> *accessor)
: _originalFuture(&originalFuture), _accessor(accessor)
{
TransferFuture::_theFuture = _originalFuture->getBoostFuture();
TransferFuture::_transferElement = accessor;
}
virtual ~TestDecoratorTransferFuture() {} virtual ~TestDecoratorTransferFuture() {}
...@@ -42,22 +35,14 @@ namespace ChimeraTK { ...@@ -42,22 +35,14 @@ namespace ChimeraTK {
_accessor->hasActiveFuture = false; _accessor->hasActiveFuture = false;
} }
TestDecoratorTransferFuture& operator=(const TestDecoratorTransferFuture &&other) { void reset(PlainFutureType plainFuture, mtca4u::TransferElement *transferElement) = delete;
TransferFuture::_theFuture = other._theFuture;
TransferFuture::_transferElement = other._transferElement;
_originalFuture = other._originalFuture;
_accessor = other._accessor;
return *this;
}
TestDecoratorTransferFuture(const TestDecoratorTransferFuture &&other)
: TransferFuture(other._theFuture, other._transferElement),
_originalFuture(other._originalFuture),
_accessor(other._accessor)
{}
TestDecoratorTransferFuture(const TestDecoratorTransferFuture &other) = delete; void reset(TransferFuture &originalFuture, TestDecoratorRegisterAccessor<UserType> *accessor) {
TestDecoratorTransferFuture& operator=(const TestDecoratorTransferFuture &other) = delete; _originalFuture = &originalFuture;
_accessor = accessor;
TransferFuture::_theFuture = _originalFuture->getBoostFuture();
TransferFuture::_transferElement = accessor;
}
protected: protected:
...@@ -182,7 +167,7 @@ namespace ChimeraTK { ...@@ -182,7 +167,7 @@ namespace ChimeraTK {
} }
auto &future = _accessor->readAsync(); auto &future = _accessor->readAsync();
TransferElement::hasActiveFuture = true; TransferElement::hasActiveFuture = true;
activeTestDecoratorFuture = TestDecoratorTransferFuture<UserType>(future, this); activeTestDecoratorFuture.reset(future, this);
return activeTestDecoratorFuture; return activeTestDecoratorFuture;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment