ChimeraTK-DeviceAccess  03.18.00
WorkingBackend.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 
4 #include "BackendFactory.h"
5 #include "DummyBackend.h"
6 
7 namespace ChimeraTK {
8  using namespace ChimeraTK;
9 }
10 using namespace ChimeraTK;
11 
12 struct WorkingBackend : public DummyBackend {
14 
15  static boost::shared_ptr<DeviceBackend> createInstance(std::string, std::map<std::string, std::string> parameters) {
16  return returnInstance<WorkingBackend>(parameters.at("map"), convertPathRelativeToDmapToAbs(parameters.at("map")));
17  }
18 
22  }
23  };
24 };
25 
26 static WorkingBackend::BackendRegisterer gWorkingBackendRegisterer;
ChimeraTK::DummyBackend::DummyBackend
DummyBackend(const std::string &mapFileName)
Definition: DummyBackend.cc:17
ChimeraTK::BackendFactory::getInstance
static BackendFactory & getInstance()
Static function to get an instance of factory.
Definition: BackendFactory.cc:191
DummyBackend.h
WorkingBackend::BackendRegisterer::BackendRegisterer
BackendRegisterer()
Definition: WorkingBackend.cc:20
WorkingBackend::createInstance
static boost::shared_ptr< DeviceBackend > createInstance(std::string, std::map< std::string, std::string > parameters)
Definition: WorkingBackend.cc:15
WorkingBackend
Definition: WorkingBackend.cc:12
BackendFactory.h
WorkingBackend::BackendRegisterer
Definition: WorkingBackend.cc:19
ChimeraTK::DummyBackend
The dummy device opens a mapping file instead of a device, and implements all registers defined in th...
Definition: DummyBackend.h:45
ChimeraTK::BackendFactory::registerBackendType
void registerBackendType(const std::string &backendType, boost::shared_ptr< DeviceBackend >(*creatorFunction)(std::string address, std::map< std::string, std::string > parameters), const std::vector< std::string > &sdmParameterNames={}, const std::string &deviceAccessVersion=CHIMERATK_DEVICEACCESS_VERSION)
Register a backend by the name backendType with the given creatorFunction.
Definition: BackendFactory.cc:45
ChimeraTK
Definition: DummyBackend.h:16