115 typedef multi_index_container<
118 ordered_unique<tag<n>,
119 member<Symbol, int, &Symbol::n> >,
120 ordered_unique<tag<key>,
121 member<Symbol, std::string, &Symbol::key> >
124 typedef SymbolTable::index<n>::type::iterator nIterator;
125 typedef SymbolTable::index<key>::type::iterator keyIterator;
131 SymbolTable::index<n>::type &nIndex = st.get<n>();
132 SymbolTable::index<key>::type &keyIndex = st.get<key>();
136 std::string typeName(
"");
137 const char *ptr = _typeName.c_str();
139 if (*ptr ==
'r' || *ptr ==
'V' || *ptr ==
'K') {
143 if (*ptr ==
'P') ptr++;
145 std::string currentSymbol =
"";
146 std::stack<char> typeStack;
148 int lastTokenWasType = 0;
149 while (*ptr !=
'\0') {
156 if (typeStack.empty()) {
157 typeStack.push(
'\a');
160 if (typeStack.top() ==
'I') {
162 }
else if (typeStack.top() ==
'L') {
164 }
else if (typeStack.top() ==
'N') {
169 if (!typeStack.empty() && typeStack.top() ==
'I') {
170 if (*ptr !=
'E' && typeName[typeName.size() - 1] !=
'<') {
177 typeStack.push(*ptr++);
183 typeStack.push(*ptr++);
187 if (interpret_typeletter(*ptr, type)) {
188 typeName +=
"(" + type +
')';
195 typeName +=
'-'; ptr++;
197 while (*ptr !=
'\0' && *ptr !=
'E') {
202 typeStack.push(*ptr++);
208 case 't': typeName +=
"::std::";
break;
209 case 'a': typeName +=
"::std::allocator";
break;
210 case 'b': typeName +=
"::std::basic_string";
break;
211 case 's': typeName +=
"::std::basic_string<char,::std::char_traits<char>,::std::allocator<char>>";
break;
212 case 'i': typeName +=
"::std::basic_istream<char, std::char_traits<char> >";
break;
213 case 'o': typeName +=
"::std::basic_ostream<char,std::char_traits<char>>";
break;
214 case 'd': typeName +=
"::std::basic_iostream<char,std::char_traits<char>>";
break;
221 }
else if (isdigit(*ptr) || isupper(*ptr)) {
222 while (isdigit(*ptr) || isupper(*ptr)) {
224 subst = 36*subst + (*ptr -
'0');
226 subst = 36*subst + 10 + (*ptr -
'A');
231 assert (*ptr ==
'_');
235 nIterator sym = nIndex.find(subst);
236 if (sym == nIndex.end()) {
239 typeName += sym->key;
247 case '0':
case '1':
case '2':
case '3':
case '4':
248 case '5':
case '6':
case '7':
case '8':
case '9':
250 const int len = atoi(ptr++);
251 while (isdigit(*ptr)) ptr++;
253 std::string
name =
"";
254 for (
int i = 0; *ptr !=
'\0' && i < len; i++) {
258 if (currentSymbol !=
"") {
259 currentSymbol +=
"::";
263 currentSymbol +=
name;
266 if (keyIndex.find(currentSymbol) == keyIndex.end()) {
267 st.insert(currentSymbol);
274 if (interpret_typeletter(*ptr, type)) {
275 if (lastTokenWasType > 0) {
279 lastTokenWasType = 2;
288 static volatile bool dumpSymbolTable =
false;
289 if (dumpSymbolTable) {
292 for (
unsigned int i = 0; i < st.size(); i++) {
293 nIterator el = nIndex.find(2);
294 if (el != nIndex.end()) {
table::Key< std::string > name