class AdLint::Cc1::FunctionSignature

Attributes

name[R]
type[R]

Public Class Methods

new(name, type) click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4448
def initialize(name, type)
  @name = name
  @type = type
end

Public Instance Methods

==(rhs) click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4455
def ==(rhs)
  if @type.parameter_types.empty? || rhs.type.parameter_types.empty?
    @name == rhs.name
  else
    @name == rhs.name && @type == rhs.type
  end
end
to_s() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 4463
def to_s
  "#{@type.return_type.brief_image} #{@name}(" +
    @type.parameter_types.map { |t| t.brief_image }.join(",") +
    (@type.have_va_list? ? ",...)" : ")")
end