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