def METHOD_NAME (iface, enumGroups, bitfieldGroups):
	definitions = makeDefSet(iface)
	def genNameProtos ():
		for groupName, values in enumGroups:
			if anyValueDefined(definitions, values):
				yield "const char*\tget%sName\t(int value);" % groupName
			else:
				print("Warning: Empty value set for %s, skipping" % groupName)
	def genBitfieldProtos ():
		for groupName, values in bitfieldGroups:
			if anyValueDefined(definitions, values):
				yield "tcu::Format::Bitfield<16>\tget%sStr\t(int value);" % groupName
			else:
				print("Warning: Empty value set for %s, skipping" % groupName)
	def genStrImpl ():
		for groupName, values in enumGroups:
			if anyValueDefined(definitions, values):
				yield "inline tcu::Format::Enum<int, 2>\tget%(name)sStr\t(int value)\t{ return tcu::Format::Enum<int, 2>(get%(name)sName, value); }" % {"name": groupName}
		# booleans can be stored in enums or in byte-sized arrays. For clarity add special case
		if anyValueDefined(definitions, ["GL_TRUE", "GL_FALSE"]):
			yield "inline tcu::Format::Enum<int, 1>\tgetBooleanStr\t(deUint8 value)\t{ return tcu::Format::Enum<int, 1>(getBooleanName, (int)value); }"
	return chain(genNameProtos(), genBitfieldProtos(), genStrImpl())