Class: AdLint::Cc1::PointerTypeId

Inherits:
TypeId
  • Object
show all
Defined in:
lib/adlint/cc1/type.rb

Instance Method Summary collapse

Methods inherited from TypeId

#eql?

Constructor Details

#initialize(base_type) ⇒ PointerTypeId

Returns a new instance of PointerTypeId.



5232
5233
5234
5235
# File 'lib/adlint/cc1/type.rb', line 5232

def initialize(base_type)
  super(create_value(base_type))
  @base_type = base_type
end

Instance Method Details

#==(rhs_id) ⇒ Object



5237
5238
5239
5240
5241
5242
5243
5244
# File 'lib/adlint/cc1/type.rb', line 5237

def ==(rhs_id)
  case rhs_id
  when PointerTypeId
    @base_type == rhs_id.base_type
  else
    false
  end
end

#hashObject



5246
5247
5248
# File 'lib/adlint/cc1/type.rb', line 5246

def hash
  "#{@base_type.id.hash}*".hash
end