ChimeraTK-DeviceAccess  03.18.00
AnotherWorkingBackend.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 "DeviceAccessVersion.h"
6 #include "DummyBackend.h"
7 
8 using namespace ChimeraTK;
9 
12 
13  static boost::shared_ptr<DeviceBackend> createInstance(
14  std::string instance, std::map<std::string, std::string> parameters) {
15  return returnInstance<AnotherWorkingBackend>(instance, convertPathRelativeToDmapToAbs(parameters["map"]));
16  }
17 
21  "another", &AnotherWorkingBackend::createInstance, {"map"}, CHIMERATK_DEVICEACCESS_VERSION);
22  }
23  };
24 };
25 
26 static AnotherWorkingBackend::BackendRegisterer gAnotherWorkingBackendRegisterer;
27 
28 extern "C" {
30  return CHIMERATK_DEVICEACCESS_VERSION;
31 }
32 }
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
AnotherWorkingBackend::BackendRegisterer
Definition: AnotherWorkingBackend.cc:18
AnotherWorkingBackend::BackendRegisterer::BackendRegisterer
BackendRegisterer()
Definition: AnotherWorkingBackend.cc:19
AnotherWorkingBackend
Definition: AnotherWorkingBackend.cc:10
AnotherWorkingBackend::createInstance
static boost::shared_ptr< DeviceBackend > createInstance(std::string instance, std::map< std::string, std::string > parameters)
Definition: AnotherWorkingBackend.cc:13
deviceAccessVersionUsedToCompile
const char * deviceAccessVersionUsedToCompile()
Definition: AnotherWorkingBackend.cc:29
BackendFactory.h
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