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

added missing implementations of writeDestructively() - the inherited ones...

added missing implementations of writeDestructively() - the inherited ones from the DeviceAccess classes are not doing the right thing...
parent 05328723
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,7 @@ namespace ChimeraTK {
}
bool write(ChimeraTK::VersionNumber versionNumber) = delete;
bool writeDestructively(ChimeraTK::VersionNumber versionNumber) = delete;
bool write() {
auto versionNumber = this->getOwner()->getCurrentVersionNumber();
......@@ -59,6 +60,13 @@ namespace ChimeraTK {
return dataLoss;
}
bool writeDestructively() {
auto versionNumber = this->getOwner()->getCurrentVersionNumber();
bool dataLoss = ChimeraTK::OneDRegisterAccessor<UserType>::writeDestructively(versionNumber);
if(dataLoss) Application::incrementDataLossCounter();
return dataLoss;
}
TransferFuture readAsync() {
throw ChimeraTK::logic_error("ArrayAccessor::readAsync() is currently not "
"supported by ApplicationCore!");
......
......@@ -52,6 +52,7 @@ namespace ChimeraTK {
}
bool write(ChimeraTK::VersionNumber versionNumber) = delete;
bool writeDestructively(ChimeraTK::VersionNumber versionNumber) = delete;
bool write() {
auto versionNumber = this->getOwner()->getCurrentVersionNumber();
......@@ -60,6 +61,13 @@ namespace ChimeraTK {
return dataLoss;
}
bool writeDestructively() {
auto versionNumber = this->getOwner()->getCurrentVersionNumber();
bool dataLoss = ChimeraTK::ScalarRegisterAccessor<UserType>::writeDestructively(versionNumber);
if(dataLoss) Application::incrementDataLossCounter();
return dataLoss;
}
protected:
friend class InversionOfControlAccessor<ScalarAccessor<UserType>>;
......
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