def writeStrUtilProto(api, filename):

    def makeStrUtilProto():
        for line in indentLines([('const char*\tget%sName\t(%s value);' % (enum.name[2:], enum.name)) for enum in api.enums if (not enum.isAlias)]):
            (yield line)
        (yield '')
        for line in indentLines([('inline tcu::Format::Enum<%s>\tget%sStr\t(%s value)\t{ return tcu::Format::Enum<%s>(get%sName, value);\t}' % (e.name, e.name[2:], e.name, e.name, e.name[2:])) for e in api.enums if (not e.isAlias)]):
            (yield line)
        (yield '')
        for line in indentLines([('inline std::ostream&\toperator<<\t(std::ostream& s, %s value)\t{ return s << get%sStr(value);\t}' % (e.name, e.name[2:])) for e in api.enums if (not e.isAlias)]):
            (yield line)
        (yield '')
        for line in indentLines([('tcu::Format::Bitfield<32>\tget%sStr\t(%s value);' % (bitfield.name[2:], bitfield.name)) for bitfield in api.bitfields if (not bitfield.isAlias)]):
            (yield line)
        (yield '')
        for line in indentLines([('std::ostream&\toperator<<\t(std::ostream& s, const %s& value);' % s.name) for s in api.compositeTypes if (not s.isAlias)]):
            (yield line)
    writeInlFile(filename, INL_HEADER, makeStrUtilProto())
def writeStrUtilProto(api, filename):

    def makeStrUtilProto():
        for line in indentLines([('const char*\tget%sName\t(%s value);' % (enum.name[2:], enum.name)) for enum in api.enums if (not enum.isAlias)]):
            (yield line)
        (yield )
        for line in indentLines([('inline tcu::Format::Enum<%s>\tget%sStr\t(%s value)\t{ return tcu::Format::Enum<%s>(get%sName, value);\t}' % (e.name, e.name[2:], e.name, e.name, e.name[2:])) for e in api.enums if (not e.isAlias)]):
            (yield line)
        (yield )
        for line in indentLines([('inline std::ostream&\toperator<<\t(std::ostream& s, %s value)\t{ return s << get%sStr(value);\t}' % (e.name, e.name[2:])) for e in api.enums if (not e.isAlias)]):
            (yield line)
        (yield )
        for line in indentLines([('tcu::Format::Bitfield<32>\tget%sStr\t(%s value);' % (bitfield.name[2:], bitfield.name)) for bitfield in api.bitfields if (not bitfield.isAlias)]):
            (yield line)
        (yield )
        for line in indentLines([('std::ostream&\toperator<<\t(std::ostream& s, const %s& value);' % s.name) for s in api.compositeTypes if (not s.isAlias)]):
            (yield line)
    writeInlFile(filename, INL_HEADER, makeStrUtilProto())