Class: AdLint::Cc1::UserType
- Inherits:
-
Type
- Object
- Type
- AdLint::Cc1::UserType
show all
- Extended by:
- Forwardable
- Includes:
- Scopeable
- Defined in:
- lib/adlint/cc1/type.rb
Instance Attribute Summary collapse
Attributes included from Scopeable
#scope
Attributes inherited from Type
#declarations, #name, #type_table
Instance Method Summary
collapse
Methods inherited from Type
#==, #_arithmetic_type_with_array, #_arithmetic_type_with_bitfield, #_arithmetic_type_with_char, #_arithmetic_type_with_double, #_arithmetic_type_with_enum, #_arithmetic_type_with_extended_big_int, #_arithmetic_type_with_float, #_arithmetic_type_with_function, #_arithmetic_type_with_int, #_arithmetic_type_with_long, #_arithmetic_type_with_long_double, #_arithmetic_type_with_long_int, #_arithmetic_type_with_long_long, #_arithmetic_type_with_long_long_int, #_arithmetic_type_with_pointer, #_arithmetic_type_with_short, #_arithmetic_type_with_short_int, #_arithmetic_type_with_signed, #_arithmetic_type_with_signed_char, #_arithmetic_type_with_signed_int, #_arithmetic_type_with_signed_long, #_arithmetic_type_with_signed_long_int, #_arithmetic_type_with_signed_long_long, #_arithmetic_type_with_signed_long_long_int, #_arithmetic_type_with_signed_short, #_arithmetic_type_with_signed_short_int, #_arithmetic_type_with_struct, #_arithmetic_type_with_undeclared, #_arithmetic_type_with_union, #_arithmetic_type_with_unresolved, #_arithmetic_type_with_unsigned, #_arithmetic_type_with_unsigned_char, #_arithmetic_type_with_unsigned_int, #_arithmetic_type_with_unsigned_long, #_arithmetic_type_with_unsigned_long_int, #_arithmetic_type_with_unsigned_long_long, #_arithmetic_type_with_unsigned_long_long_int, #_arithmetic_type_with_unsigned_short, #_arithmetic_type_with_unsigned_short_int, #_arithmetic_type_with_void, #aligned_bit_size, #aligned_byte_size, #arbitrary_value, #argument_promoted_type, #arithmetic_type_with, #array?, #base_type, #bit_alignment, #bit_size, #bitfield?, #byte_alignment, #byte_size, #coerce_array_value, #coerce_composite_value, #coerce_scalar_value, #coercible?, #compatible?, #composite?, #const?, #convertible?, #corresponding_signed_type, #corresponding_unsigned_type, #enum?, #enumerators, #explicitly_signed?, #floating?, #function?, #have_va_list?, #image, #impl_length, #incomplete?, #inspect, #integer?, #integer_conversion_rank, #integer_promoted_type, #length, #length=, #max, #member_named, #members, #min, #more_cv_qualified?, #nil_value, #parameter?, #parameter_types, #parameter_value, #pointer?, #qualified?, #real_type, #restrict?, #return_type, #return_value, #same_as?, #scalar?, #signed?, #struct?, #undeclared?, #undefined_value, #union?, #unresolved?, #unsigned?, #void?, #volatile?, #zero_value
#char_alignment, #char_as_unsigned_char?, #char_size, #code_ptr_alignment, #code_ptr_size, #data_ptr_alignment, #data_ptr_size, #double_alignment, #double_size, #float_alignment, #float_size, #int_alignment, #int_size, #long_alignment, #long_double_alignment, #long_double_size, #long_long_alignment, #long_long_size, #long_size, #short_alignment, #short_size, #standard_types
#arithmetic, #logical_right_shift?
Methods included from Visitable
#accept
Constructor Details
#initialize(type_tbl, typedef_dcl, base_type) ⇒ UserType
Returns a new instance of UserType.
6800
6801
6802
6803
6804
|
# File 'lib/adlint/cc1/type.rb', line 6800
def initialize(type_tbl, typedef_dcl, base_type)
super(type_tbl, typedef_dcl.identifier.value, [typedef_dcl])
@location = typedef_dcl.location
@base_type = base_type
end
|
Instance Attribute Details
Returns the value of attribute location.
6806
6807
6808
|
# File 'lib/adlint/cc1/type.rb', line 6806
def location
@location
end
|
Instance Method Details
#brief_image ⇒ Object
6816
6817
6818
|
# File 'lib/adlint/cc1/type.rb', line 6816
def brief_image
name
end
|
6934
6935
6936
|
# File 'lib/adlint/cc1/type.rb', line 6934
def dup
UserType.new(type_table, declarations.first, @base_type.dup)
end
|
6808
6809
6810
|
# File 'lib/adlint/cc1/type.rb', line 6808
def id
@id ||= UserTypeId.new(name)
end
|
#named? ⇒ Boolean
6820
6821
6822
|
# File 'lib/adlint/cc1/type.rb', line 6820
def named?
true
end
|
#standard? ⇒ Boolean
6853
6854
6855
|
# File 'lib/adlint/cc1/type.rb', line 6853
def standard?
false
end
|
#unqualify ⇒ Object
6829
6830
6831
|
# File 'lib/adlint/cc1/type.rb', line 6829
def unqualify
self
end
|
#user? ⇒ Boolean
6847
6848
6849
|
# File 'lib/adlint/cc1/type.rb', line 6847
def user?
true
end
|