ConverterRegistry.h
Go to the documentation of this file.
1#pragma once
2
3#include <map>
4#include <memory>
5#include <string>
6#include <vector>
7
9
11{
13 {
14 public:
16
17 template <class ConverterT, class... Args>
18 void
19 add(const std::string& key, Args... args)
20 {
21 converters[key].reset(new ConverterT(args...));
22 }
23
24 ConverterInterface* get(const std::string& key) const;
25 std::vector<std::string> getKeys() const;
26
27
28 private:
29 std::map<std::string, std::unique_ptr<ConverterInterface>> converters;
30 };
31} // namespace armarx::armem::server::robot_state::exteroception
ConverterInterface * get(const std::string &key) const