Lines Matching refs:outstring
373 outstring = '\n'
375 outstring += '\n#ifdef %s\n\n' % self.featureExtraProtect
376 … outstring += 'static inline const char* string_%s(%s input_value)\n' % (groupName, groupName)
377 outstring += '{\n'
378 outstring += ' switch ((%s)input_value)\n' % groupName
379 outstring += ' {\n'
383 outstring += ' case %s:\n' % item
384 outstring += ' return "%s";\n' % item
385 outstring += ' default:\n'
386 outstring += ' return "Unhandled %s";\n' % groupName
387 outstring += ' }\n'
388 outstring += '}\n'
392 outstring += '\n'
394 … outstring += 'static inline std::string string_%s(%s input_value)\n' % (flagsName, flagsName)
395 outstring += '{\n'
396 outstring += ' std::string ret;\n'
397 outstring += ' int index = 0;\n'
398 outstring += ' while(input_value) {\n'
399 outstring += ' if (input_value & 1) {\n'
400 outstring += ' if( !ret.empty()) ret.append("|");\n'
401 …outstring += ' ret.append(string_%s(static_cast<%s>(1 << index)));\n' % (groupName, gro…
402 outstring += ' }\n'
403 outstring += ' ++index;\n'
404 outstring += ' input_value >>= 1;\n'
405 outstring += ' }\n'
406 …outstring += ' if( ret.empty()) ret.append(string_%s(static_cast<%s>(0)));\n' % (groupName, gro…
407 outstring += ' return ret;\n'
408 outstring += '}\n'
411 outstring += '#endif // %s\n' % self.featureExtraProtect
412 return outstring