26 std::string::size_type ipos = 0;
27 while ((ipos =
f.find (
", std::allocator", ipos)) != std::string::npos) {
28 const char*
p =
f.c_str() + ipos + 16;
29 while (isspace (*
p)) ++
p;
33 while (nest > 0 && *
p) {
41 if (ipos > 0 &&
f[ipos-1] !=
'>') {
42 while (isspace (*
p)) ++
p;
44 f.erase (ipos,
p-
f.c_str()-ipos);
56 std::string
s = str_in;
58 std::string::size_type ipos = 0;
59 while ((ipos =
s.find (
"std::basic_string<", ipos)) != std::string::npos) {
60 std::string::size_type
beg = ipos;
63 while (inest > 0 && ipos <
s.size()) {
64 if (
s[ipos] ==
'<') ++inest;
65 else if (
s[ipos] ==
'>') --inest;
68 s.replace (
beg, ipos-
beg,
"std::string");
72 for (
size_t i = 0;
i <
s.size();
i++) {
73 if ((
i == 0 || (
s[
i-1] !=
':' && !isalnum(
s[
i-1]))) &&
74 strncmp (
s.c_str()+
i,
"string", 6) == 0 &&
77 s.replace (
i, 6,
"std::string");
86 std::string
s = str_in;
87 for (
size_t i = 0;
i <
s.size()-1;
i++) {
88 if (
s[
i] ==
' ' && (
s[
i+1] ==
'*' ||
s[
i+1] ==
'&'))
96 const std::string&
pat,
97 const std::string&
rep)
99 std::string::size_type ipos = 0;
100 while ((ipos =
s.find (
pat, ipos)) != std::string::npos)
101 s.replace (ipos,
pat.size(),
rep);
109 do_replace (str_in,
"SG::DataProxyStorageData::pointer",
"void*");
116 if (
s.compare (0, 8,
"virtual ") == 0)