ConverterRegistry.cpp
Go to the documentation of this file.
1 #include "ConverterRegistry.h"
2 
3 #include <SimoxUtility/algorithm/get_map_keys_values.h>
4 
5 #include "ArmarDEConverter.h"
6 
8 {
9 
11  {
12  add<ArmarDEConverter>("ArmarDE");
13  add<ArmarDEConverter>("Armar7");
14  }
15 
17  ConverterRegistry::get(const std::string& key) const
18  {
19  auto it = converters.find(key);
20  return it != converters.end() ? it->second.get() : nullptr;
21  }
22 
23  std::vector<std::string>
25  {
26  return simox::alg::get_keys(converters);
27  }
28 
29 } // namespace armarx::armem::server::robot_state::exteroception
armarx::armem::server::robot_state::exteroception::ConverterInterface
Definition: ConverterInterface.h:21
armarx::armem::server::robot_state::exteroception::ConverterRegistry::ConverterRegistry
ConverterRegistry()
Definition: ConverterRegistry.cpp:10
ArmarDEConverter.h
armarx::armem::server::robot_state::exteroception
Definition: ArmarDEConverter.cpp:18
ConverterRegistry.h
armarx::armem::server::robot_state::exteroception::ConverterRegistry::getKeys
std::vector< std::string > getKeys() const
Definition: ConverterRegistry.cpp:24
armarx::armem::server::robot_state::exteroception::ConverterRegistry::get
ConverterInterface * get(const std::string &key) const
Definition: ConverterRegistry.cpp:17