ChimeraTK-DeviceAccess 03.25.00
Loading...
Searching...
No Matches
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
6namespace 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
std::list< boost::shared_ptr< TransferElement > > getInternalElements()
Obtain the full list of TransferElements internally used by this TransferElement.
void setPersistentDataStorage(boost::shared_ptr< ChimeraTK::PersistentDataStorage > storage)
Associate a persistent data storage object to be updated on each write operation of this ProcessArray...
std::vector< boost::shared_ptr< TransferElement > > getHardwareAccessingElements()
Obtain the underlying TransferElements with actual hardware access.
void replaceTransferElement(const boost::shared_ptr< TransferElement > &newElement)
Search for all underlying TransferElements which are considered identical (see mayReplaceOther()) wit...
boost::shared_ptr< TransferElement > _impl
Untyped pointer to implementation.