def CppCallMethod(scope, type_defn, object_expr, mutable, method, param_exprs):
  """Gets the representation of a member function call.

  Args:
    scope: a Definition for the scope in which the expression will be written.
    type_defn: a Definition, representing the type of the object being called.
    object_expr: a string, which is the expression for the object being called.
    mutable: a boolean, whether or not the 'object_expr' expression is mutable
      or not
    method: a Function, representing the function to call.
    param_exprs: a list of strings, each being the expression for the value of
      each parameter.

  Returns:
    a string, which is the expression for the function call.
  """
  (scope, type_defn) = (scope, type_defn)  # silence gpylint.
  if mutable:
    return '%s->%s(%s)' % (object_expr, method.name, ', '.join(param_exprs))
  else:
    return '%s.%s(%s)' % (object_expr, method.name, ', '.join(param_exprs))