28 if(!target->isReadable()) {
43 _target->postRead(type, hasNewData);
45 for(
size_t i = 0; i < _target->getNumberOfChannels(); ++i)
buffer_2D[i] = _target->accessChannel(i);
50 std::cerr <<
"CopyRegisterDecorator::doReadTransferSynchronously: Must not be called" << std::endl;
54 [[nodiscard]]
bool isReadOnly()
const override {
return true; }
56 [[nodiscard]]
bool isWriteable()
const override {
return false; }
Base class for decorators of the NDRegisterAccessor.
N-dimensional register accessor.
std::vector< std::vector< UserType > > buffer_2D
Buffer of converted data elements.
Class for generating and holding version numbers without exposing a numeric representation.
Exception thrown when a logic error has occured.
TransferType
Used to indicate the applicable operation on a Transferelement.
Decorator for NDRegisterAccessors which makes a copy of the data from the target accessor.
CopyRegisterDecorator(const boost::shared_ptr< ChimeraTK::NDRegisterAccessor< T > > &target)
void doPostRead(TransferType type, bool hasNewData) override
Backend specific implementation of postRead().
void doPreRead(TransferType) override
Backend specific implementation of preRead().
bool isReadOnly() const override
Check if transfer element is read only, i.e.
void doReadTransferSynchronously()
Implementation version of readTransfer() for synchronous reads.
void doPreWrite(TransferType, VersionNumber) override
Backend specific implementation of preWrite().
bool isWriteable() const override
Check if transfer element is writeable.
Runtime type trait to identify CopyRegisterDecorators independent of their type.