ChimeraTK-DeviceAccess-DoocsBackend  01.09.02
CatalogueFetcher.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RegisterInfo.h"
4 
5 #include <future>
6 #include <memory>
7 #include <string>
8 #include <utility>
9 
11  public:
12  CatalogueFetcher(const std::string& serverAddress, std::future<void> cancelIndicator)
13  : serverAddress_(serverAddress), cancelFlag_(std::move(cancelIndicator)) {}
14 
15  std::pair<DoocsBackendRegisterCatalogue, bool> fetch();
16 
17  private:
18  std::string serverAddress_;
19  std::future<void> cancelFlag_;
21  bool locationLookupError_{false};
22 
23  void fillCatalogue(std::string fixedComponents, long level);
24  bool isCancelled() const { return (cancelFlag_.wait_for(std::chrono::microseconds(0)) == std::future_status::ready); }
25  bool checkZmqAvailability(const std::string& fullQualifiedName) const;
26 };
DoocsBackendRegisterCatalogue
Definition: RegisterInfo.h:12
CatalogueFetcher
Definition: CatalogueFetcher.h:10
RegisterInfo.h
CatalogueFetcher::CatalogueFetcher
CatalogueFetcher(const std::string &serverAddress, std::future< void > cancelIndicator)
Definition: CatalogueFetcher.h:12
CatalogueFetcher::fetch
std::pair< DoocsBackendRegisterCatalogue, bool > fetch()
Definition: CatalogueFetcher.cc:14