cgv
Loading...
Searching...
No Matches
type_name.cxx
1
#include "type_name.h"
2
#include <
cgv/utils/scan.h
>
3
namespace
cgv
{
4
namespace
type {
6
namespace
info {
7
9
std::string
extract_type_name
(
const
std::type_info& ti)
10
{
11
std::string res(ti.name());
12
cgv::utils::replace
(res,
"class "
,
""
);
13
cgv::utils::replace
(res,
"struct "
,
""
);
14
cgv::utils::replace
(res,
"union "
,
""
);
15
cgv::utils::replace
(res,
"enum "
,
""
);
16
return
res;
17
}
18
19
20
}
21
}
22
}
cgv::type::info::extract_type_name
std::string extract_type_name(const std::type_info &ti)
extract a type name from an type_info structure that does not contain the class, struct nor enum keyw...
Definition
type_name.cxx:9
cgv::utils::replace
unsigned int replace(std::string &s, char c1, char c2)
replace char c1 with c2 in the given string _s and return number of replacements
Definition
scan.cxx:159
cgv
the cgv namespace
Definition
print.h:11
scan.h
Helper functions to process strings.
cgv
type
info
type_name.cxx
Generated by
1.9.8