8#include <ChimeraTK/VoidRegisterAccessor.h>
21 void replace(
const ChimeraTK::NDRegisterAccessorAbstractor<ChimeraTK::Void>& newAccessor) =
delete;
24 using ChimeraTK::VoidRegisterAccessor::operator=;
32 bool write(ChimeraTK::VersionNumber versionNumber) =
delete;
44 UpdateMode mode,
const std::string& description,
const std::unordered_set<std::string>& tags = {});
47 const std::string& description,
const std::unordered_set<std::string>& tags = {});
58 const std::unordered_set<std::string>& tags = {})
62 using VoidAccessor::operator=;
70 const std::unordered_set<std::string>& tags = {})
74 using VoidAccessor::operator=;
87 catch(ChimeraTK::logic_error& e) {
88 std::cerr <<
"ChimeraTK::logic_error caught: " << e.what() << std::endl;
101 catch(ChimeraTK::logic_error& e) {
102 std::cerr <<
"ChimeraTK::logic_error caught: " << e.what() << std::endl;
112 bool dataLoss = ChimeraTK::VoidRegisterAccessor::write(versionNumber);
123 bool dataLoss = ChimeraTK::VoidRegisterAccessor::writeDestructively(versionNumber);
133 std::string& unit,
UpdateMode mode,
const std::string& description,
const std::unordered_set<std::string>& tags)
135 owner, name, direction, unit, 1, mode, description, &typeid(
ChimeraTK::Void), tags) {}
140 UpdateMode mode,
const std::string& description,
const std::unordered_set<std::string>& tags)
142 owner, name, direction,
"", 1, mode, description, &typeid(
ChimeraTK::Void), tags) {}
static void incrementDataLossCounter(const std::string &name)
Increment counter for how many write() operations have overwritten unread data.
virtual VersionNumber getCurrentVersionNumber() const =0
Return the current version number which has been received with the last push-type read operation.
Adds features required for inversion of control to an accessor.
VariableNetworkNode _node
void replace(Derived &&other)
Replace with other accessor.
EntityOwner * getOwner() const
Return the owning module.
Base class for ApplicationModule and DeviceModule, to have a common interface for these module types.
Class describing a node of a variable network.
std::string getQualifiedName() const
Accessor for void variables (i.e.
VoidAccessor & operator=(VoidAccessor &other)=delete
void replace(const ChimeraTK::NDRegisterAccessorAbstractor< ChimeraTK::Void > &newAccessor)=delete
VoidAccessor()=default
Default constructor creates a dysfunctional accessor (to be assigned with a real accessor later)
bool writeDestructively(ChimeraTK::VersionNumber versionNumber)=delete
bool write(ChimeraTK::VersionNumber versionNumber)=delete
bool writeDestructively()
InvalidityTracer application module.
UpdateMode
Enum to define the update mode of variables.
Struct to define the direction of variables.
Convenience class for output void (always UpdateMode::push)
VoidOutput(Module *owner, const std::string &name, const std::string &description, const std::unordered_set< std::string > &tags={})