pal_statistics_macros.cpp
Go to the documentation of this file.
1 /*
2  @file
3 
4  @author victor
5 
6  @copyright (c) 2018 PAL Robotics SL. All Rights Reserved
7 */
8 
10 namespace pal_statistics
11 {
13 {
14  typedef std::map<std::string, boost::shared_ptr<StatisticsRegistry> > RegistryMap;
15  static RegistryMap registries;
16 
17  RegistryMap::const_iterator cit = registries.find(topic);
18 
19  if (cit == registries.end())
20  {
22  boost::make_shared<StatisticsRegistry>(topic);
23  registries[topic] = ptr;
24  return ptr;
25  }
26  else
27  {
28  return cit->second;
29  }
30 }
31 } //namespace pal_statistics
boost::shared_ptr< StatisticsRegistry > getRegistry(const std::string &topic)


pal_statistics
Author(s):
autogenerated on Mon Feb 28 2022 23:04:05