diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-09-18 17:29:26 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-09-18 17:29:26 +0200 |
commit | b4a9ebad6c43205225be9ad9634ff2a31527d987 (patch) | |
tree | 33b1623bb80cc940477088bd7333b4615d287462 /src/device/device.hpp | |
parent | Merge pull request #4273 (diff) | |
parent | hw_device: support for multiple devices added [for review] (diff) | |
download | monero-b4a9ebad6c43205225be9ad9634ff2a31527d987.tar.xz |
Merge pull request #4299
f9b22a7b hw_device: support for multiple devices added [for review] (Dusan Klinec)
Diffstat (limited to 'src/device/device.hpp')
-rw-r--r-- | src/device/device.hpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/device/device.hpp b/src/device/device.hpp index c21456daf..d14b8848c 100644 --- a/src/device/device.hpp +++ b/src/device/device.hpp @@ -202,6 +202,17 @@ namespace hw { ~reset_mode() { hwref.set_mode(hw::device::NONE);} }; - device& get_device(const std::string device_descriptor) ; + class device_registry { + private: + std::map<std::string, std::unique_ptr<device>> registry; + + public: + device_registry(); + bool register_device(const std::string & device_name, device * hw_device); + device& get_device(const std::string & device_descriptor); + }; + + device& get_device(const std::string & device_descriptor); + bool register_device(const std::string & device_name, device * hw_device); } |