SMACC
Loading...
Searching...
No Matches
common.cpp
Go to the documentation of this file.
1/*****************************************************************************************************************
2 * ReelRobotix Inc. - Software License Agreement Copyright (c) 2018
3 * Authors: Pablo Inigo Blasco, Brett Aldrich
4 *
5 ******************************************************************************************************************/
6#include "smacc/common.h"
8
9namespace smacc
10{
11namespace utils
12{
13
14std::string cleanShortTypeName(const std::type_info &tinfo)
15{
16 auto typeinfo= TypeInfo::getFromStdTypeInfo(tinfo);
17 auto nontemplatedfullclasname = typeinfo->getNonTemplatedTypeName();
18
19
20 //ROS_INFO("State full classname: %s", fullclassname.c_str());
21
22 std::vector<std::string> strs;
23 boost::split(strs, nontemplatedfullclasname, boost::is_any_of("::"));
24 std::string classname = strs.back();
25 //ROS_INFO("State classname: %s", classname.c_str());
26
27
28 return classname;
29}
30} // namespace utils
31} // namespace smacc
static TypeInfo::Ptr getFromStdTypeInfo(const std::type_info &tid)
std::string cleanShortTypeName(const std::type_info &tinfo)
Definition: common.cpp:14