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