Converts a TypeCode into its string name.

        :param type: the TypeCode to convert into a string.

        :return: the name of the TypeCode passed as a string value.

def to_string(type):
        """
        Converts a TypeCode into its string name.

        :param type: the TypeCode to convert into a string.

        :return: the name of the TypeCode passed as a string value.
        """
        if type == None:
            return "unknown"
        elif type == TypeCode.Unknown:
            return "unknown"
        elif type == TypeCode.String:
            return "string"
        elif type == TypeCode.Integer:
            return "integer"
        elif type == TypeCode.Long:
            return "long"
        elif type == TypeCode.Float:
            return "float"
        elif type == TypeCode.Double:
            return "double"
        elif type == TypeCode.Duration:
            return "duration"
        elif type == TypeCode.DateTime:
            return "datetime"
        elif type == TypeCode.Object:
            return "object"
        elif type == TypeCode.Enum:
            return "enum"
        elif type == TypeCode.Array:
            return "array"
        elif type == TypeCode.Map:
            return "map"
        else:
            return "unknown"