src
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
9
#include <
pal_statistics/pal_statistics_macros.h
>
10
namespace
pal_statistics
11
{
12
boost::shared_ptr<StatisticsRegistry>
getRegistry
(
const
std::string &topic)
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
{
21
boost::shared_ptr<StatisticsRegistry>
ptr =
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
pal_statistics::getRegistry
boost::shared_ptr< StatisticsRegistry > getRegistry(const std::string &topic)
Definition:
pal_statistics_macros.cpp:12
pal_statistics_macros.h
pal_statistics
Definition:
extract_rosbag_signals.h:14
pal_statistics
Author(s):
autogenerated on Fri Aug 2 2024 08:29:35