ChimeraTK-DeviceAccess  03.18.00
predicates.h
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 #pragma once
4 
5 #include "DeviceInfoMap.h"
7 
8 #include <utility>
9 
10 namespace ChimeraTK {
11 
16  private:
17  std::string _name;
18 
19  public:
20  explicit findDevByName_pred(std::string name) : _name(std::move(name)) {}
21 
22  bool operator()(const DeviceInfoMap::DeviceInfo& elem) { return elem.deviceName == _name; }
23  };
24 
29  public:
31  return first.deviceName < second.deviceName;
32  }
33  };
34 
35 } // namespace ChimeraTK
ChimeraTK::findDevByName_pred
Provides predicate to search device by name.
Definition: predicates.h:15
ChimeraTK::DeviceInfoMap::DeviceInfo::deviceName
std::string deviceName
logical name of the device
Definition: DeviceInfoMap.h:32
ChimeraTK::findDevByName_pred::operator()
bool operator()(const DeviceInfoMap::DeviceInfo &elem)
Definition: predicates.h:22
ChimeraTK::findDevByName_pred::findDevByName_pred
findDevByName_pred(std::string name)
Definition: predicates.h:20
ChimeraTK::copmaredRegisterInfosByName2_functor::operator()
bool operator()(const DeviceInfoMap::DeviceInfo &first, const DeviceInfoMap::DeviceInfo &second)
Definition: predicates.h:30
NumericAddressedRegisterCatalogue.h
ChimeraTK::DeviceInfoMap::DeviceInfo
Stores information about one device.
Definition: DeviceInfoMap.h:30
ChimeraTK::copmaredRegisterInfosByName2_functor
Provides predicate to compare devices by device file by name.
Definition: predicates.h:28
DeviceInfoMap.h
ChimeraTK
Definition: DummyBackend.h:16