ChimeraTK-DeviceAccess  03.18.00
TransferElementAbstractor.cc
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 
5 
6 namespace ChimeraTK {
7 
8  /********************************************************************************************************************/
9 
10  std::vector<boost::shared_ptr<TransferElement>> TransferElementAbstractor::getHardwareAccessingElements() {
11  return _impl->getHardwareAccessingElements();
12  }
13 
14  /********************************************************************************************************************/
15 
16  std::list<boost::shared_ptr<TransferElement>> TransferElementAbstractor::getInternalElements() {
17  auto result = _impl->getInternalElements();
18  result.push_front(_impl);
19  return result;
20  }
21 
22  /********************************************************************************************************************/
23 
24  void TransferElementAbstractor::replaceTransferElement(const boost::shared_ptr<TransferElement>& newElement) {
25  if(newElement->mayReplaceOther(_impl)) {
26  if(newElement != _impl) {
27  _impl = newElement->makeCopyRegisterDecorator();
28  }
29  }
30  else {
31  _impl->replaceTransferElement(newElement);
32  }
33  }
34 
35  /********************************************************************************************************************/
36 
38  boost::shared_ptr<ChimeraTK::PersistentDataStorage> storage) {
39  _impl->setPersistentDataStorage(std::move(storage));
40  }
41 
42  /********************************************************************************************************************/
43 
44 } // namespace ChimeraTK
ChimeraTK::TransferElementAbstractor::getHardwareAccessingElements
std::vector< boost::shared_ptr< TransferElement > > getHardwareAccessingElements()
Obtain the underlying TransferElements with actual hardware access.
Definition: TransferElementAbstractor.cc:10
ChimeraTK::TransferElementAbstractor::setPersistentDataStorage
void setPersistentDataStorage(boost::shared_ptr< ChimeraTK::PersistentDataStorage > storage)
Associate a persistent data storage object to be updated on each write operation of this ProcessArray...
Definition: TransferElementAbstractor.cc:37
TransferElementAbstractor.h
ChimeraTK::TransferElementAbstractor::replaceTransferElement
void replaceTransferElement(const boost::shared_ptr< TransferElement > &newElement)
Search for all underlying TransferElements which are considered identical (see mayReplaceOther()) wit...
Definition: TransferElementAbstractor.cc:24
ChimeraTK::TransferElementAbstractor::getInternalElements
std::list< boost::shared_ptr< TransferElement > > getInternalElements()
Obtain the full list of TransferElements internally used by this TransferElement.
Definition: TransferElementAbstractor.cc:16
ChimeraTK::TransferElementAbstractor::_impl
boost::shared_ptr< TransferElement > _impl
Untyped pointer to implementation.
Definition: TransferElementAbstractor.h:225
ChimeraTK
Definition: DummyBackend.h:16