Class: AdLint::Cc1::CompositeDataType
Overview
DESCRIPTION
Type of the ‘struct’ or ‘union’ data type.
The ISO C99 standard specifies that the ‘struct’ and array data type is an aggregate type. But the CompositeDataType is not an array type.
Instance Attribute Summary collapse
Attributes included from Scopeable
#scope
Attributes inherited from Type
#declarations, #name, #type_table
Instance Method Summary
collapse
-
#_arithmetic_type_with_array(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_bitfield(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_char(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_double(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_enum(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_float(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_function(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_long(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_long_double(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_long_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_long_long(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_pointer(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_short(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_short_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_char(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_long(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_short(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_struct(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_undeclared(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_union(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unresolved(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) ⇒ Object
-
#_arithmetic_type_with_void(lhs_type, rhs_type = self) ⇒ Object
-
#aligned_bit_size ⇒ Object
-
#arbitrary_value ⇒ Object
-
#argument_promoted_type ⇒ Object
-
#arithmetic_type_with(type) ⇒ Object
-
#array? ⇒ Boolean
-
#base_type ⇒ Object
-
#bit_alignment ⇒ Object
-
#bit_size ⇒ Object
-
#bitfield? ⇒ Boolean
-
#brief_image ⇒ Object
-
#coerce_array_value(val) ⇒ Object
-
#coerce_composite_value(val) ⇒ Object
-
#coerce_scalar_value(val) ⇒ Object
-
#coercible?(to_type) ⇒ Boolean
-
#compatible?(to_type) ⇒ Boolean
-
#const? ⇒ Boolean
-
#corresponding_signed_type ⇒ Object
-
#corresponding_unsigned_type ⇒ Object
-
#dup ⇒ Object
-
#enum? ⇒ Boolean
-
#enumerators ⇒ Object
-
#explicitly_signed? ⇒ Boolean
-
#floating? ⇒ Boolean
-
#function? ⇒ Boolean
-
#have_va_list? ⇒ Boolean
-
#id ⇒ Object
-
#image ⇒ Object
-
#impl_length ⇒ Object
-
#incomplete? ⇒ Boolean
-
#initialize(type_tbl, name, type_dcls, membs) ⇒ CompositeDataType
constructor
A new instance of CompositeDataType.
-
#integer? ⇒ Boolean
-
#integer_conversion_rank ⇒ Object
-
#integer_promoted_type ⇒ Object
-
#length ⇒ Object
-
#location ⇒ Object
-
#max ⇒ Object
-
#member_named(name) ⇒ Object
-
#min ⇒ Object
-
#named? ⇒ Boolean
-
#nil_value ⇒ Object
-
#parameter_types ⇒ Object
-
#parameter_value ⇒ Object
-
#pointer? ⇒ Boolean
-
#qualified? ⇒ Boolean
-
#real_type ⇒ Object
-
#restrict? ⇒ Boolean
-
#return_type ⇒ Object
-
#return_value ⇒ Object
-
#scalar? ⇒ Boolean
-
#signed? ⇒ Boolean
-
#standard? ⇒ Boolean
-
#undeclared? ⇒ Boolean
-
#undefined_value ⇒ Object
-
#unqualify ⇒ Object
-
#unresolved? ⇒ Boolean
-
#user? ⇒ Boolean
-
#void? ⇒ Boolean
-
#volatile? ⇒ Boolean
-
#zero_value ⇒ Object
Methods inherited from Type
#==, #aligned_byte_size, #byte_alignment, #byte_size, #composite?, #convertible?, #inspect, #length=, #more_cv_qualified?, #parameter?, #same_as?, #struct?, #union?, #unsigned?
#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, name, type_dcls, membs) ⇒ CompositeDataType
Returns a new instance of CompositeDataType.
6139
6140
6141
6142
|
# File 'lib/adlint/cc1/type.rb', line 6139
def initialize(type_tbl, name, type_dcls, membs)
super(type_tbl, name, type_dcls)
@members = membs
end
|
Instance Attribute Details
Returns the value of attribute members.
6144
6145
6146
|
# File 'lib/adlint/cc1/type.rb', line 6144
def members
@members
end
|
Instance Method Details
#_arithmetic_type_with_array(lhs_type, rhs_type = self) ⇒ Object
6647
6648
6649
|
# File 'lib/adlint/cc1/type.rb', line 6647
def _arithmetic_type_with_array(lhs_type, rhs_type = self)
rhs_type.arithmetic_type_with(lhs_type)
end
|
#_arithmetic_type_with_bitfield(lhs_type, rhs_type = self) ⇒ Object
6623
6624
6625
6626
6627
6628
6629
|
# File 'lib/adlint/cc1/type.rb', line 6623
def _arithmetic_type_with_bitfield(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_char(lhs_type, rhs_type = self) ⇒ Object
6393
6394
6395
6396
6397
6398
6399
|
# File 'lib/adlint/cc1/type.rb', line 6393
def _arithmetic_type_with_char(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_double(lhs_type, rhs_type = self) ⇒ Object
6607
6608
6609
6610
6611
6612
6613
|
# File 'lib/adlint/cc1/type.rb', line 6607
def _arithmetic_type_with_double(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_enum(lhs_type, rhs_type = self) ⇒ Object
6631
6632
6633
6634
6635
6636
6637
|
# File 'lib/adlint/cc1/type.rb', line 6631
def _arithmetic_type_with_enum(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self) ⇒ Object
6663
6664
6665
6666
6667
6668
6669
|
# File 'lib/adlint/cc1/type.rb', line 6663
def _arithmetic_type_with_extended_big_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_float(lhs_type, rhs_type = self) ⇒ Object
6599
6600
6601
6602
6603
6604
6605
|
# File 'lib/adlint/cc1/type.rb', line 6599
def _arithmetic_type_with_float(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_function(lhs_type, rhs_type = self) ⇒ Object
6389
6390
6391
|
# File 'lib/adlint/cc1/type.rb', line 6389
def _arithmetic_type_with_function(lhs_type, rhs_type = self)
rhs_type.arithmetic_type_with(lhs_type)
end
|
#_arithmetic_type_with_int(lhs_type, rhs_type = self) ⇒ Object
6465
6466
6467
6468
6469
6470
|
# File 'lib/adlint/cc1/type.rb', line 6465
def _arithmetic_type_with_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_long(lhs_type, rhs_type = self) ⇒ Object
6504
6505
6506
6507
6508
6509
|
# File 'lib/adlint/cc1/type.rb', line 6504
def _arithmetic_type_with_long(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_long_double(lhs_type, rhs_type = self) ⇒ Object
6615
6616
6617
6618
6619
6620
6621
|
# File 'lib/adlint/cc1/type.rb', line 6615
def _arithmetic_type_with_long_double(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_long_int(lhs_type, rhs_type = self) ⇒ Object
6527
6528
6529
6530
6531
6532
6533
|
# File 'lib/adlint/cc1/type.rb', line 6527
def _arithmetic_type_with_long_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_long_long(lhs_type, rhs_type = self) ⇒ Object
6551
6552
6553
6554
6555
6556
6557
|
# File 'lib/adlint/cc1/type.rb', line 6551
def _arithmetic_type_with_long_long(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_long_long_int(lhs_type, rhs_type = self) ⇒ Object
6575
6576
6577
6578
6579
6580
6581
|
# File 'lib/adlint/cc1/type.rb', line 6575
def _arithmetic_type_with_long_long_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_pointer(lhs_type, rhs_type = self) ⇒ Object
6639
6640
6641
6642
6643
6644
6645
|
# File 'lib/adlint/cc1/type.rb', line 6639
def _arithmetic_type_with_pointer(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_short(lhs_type, rhs_type = self) ⇒ Object
6417
6418
6419
6420
6421
6422
6423
|
# File 'lib/adlint/cc1/type.rb', line 6417
def _arithmetic_type_with_short(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_short_int(lhs_type, rhs_type = self) ⇒ Object
6441
6442
6443
6444
6445
6446
6447
|
# File 'lib/adlint/cc1/type.rb', line 6441
def _arithmetic_type_with_short_int(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_signed(lhs_type, rhs_type = self) ⇒ Object
6472
6473
6474
6475
6476
6477
6478
|
# File 'lib/adlint/cc1/type.rb', line 6472
def _arithmetic_type_with_signed(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_signed_char(lhs_type, rhs_type = self) ⇒ Object
6401
6402
6403
6404
6405
6406
6407
|
# File 'lib/adlint/cc1/type.rb', line 6401
def _arithmetic_type_with_signed_char(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_signed_int(lhs_type, rhs_type = self) ⇒ Object
6480
6481
6482
6483
6484
6485
6486
|
# File 'lib/adlint/cc1/type.rb', line 6480
def _arithmetic_type_with_signed_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_signed_long(lhs_type, rhs_type = self) ⇒ Object
6511
6512
6513
6514
6515
6516
6517
|
# File 'lib/adlint/cc1/type.rb', line 6511
def _arithmetic_type_with_signed_long(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self) ⇒ Object
6535
6536
6537
6538
6539
6540
6541
|
# File 'lib/adlint/cc1/type.rb', line 6535
def _arithmetic_type_with_signed_long_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self) ⇒ Object
6559
6560
6561
6562
6563
6564
6565
|
# File 'lib/adlint/cc1/type.rb', line 6559
def _arithmetic_type_with_signed_long_long(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self) ⇒ Object
6583
6584
6585
6586
6587
6588
6589
|
# File 'lib/adlint/cc1/type.rb', line 6583
def _arithmetic_type_with_signed_long_long_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_signed_short(lhs_type, rhs_type = self) ⇒ Object
6425
6426
6427
6428
6429
6430
6431
|
# File 'lib/adlint/cc1/type.rb', line 6425
def _arithmetic_type_with_signed_short(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self) ⇒ Object
6449
6450
6451
6452
6453
6454
6455
|
# File 'lib/adlint/cc1/type.rb', line 6449
def _arithmetic_type_with_signed_short_int(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_struct(lhs_type, rhs_type = self) ⇒ Object
6651
6652
6653
6654
6655
|
# File 'lib/adlint/cc1/type.rb', line 6651
def _arithmetic_type_with_struct(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_undeclared(lhs_type, rhs_type = self) ⇒ Object
6377
6378
6379
|
# File 'lib/adlint/cc1/type.rb', line 6377
def _arithmetic_type_with_undeclared(lhs_type, rhs_type = self)
rhs_type.arithmetic_type_with(lhs_type)
end
|
#_arithmetic_type_with_union(lhs_type, rhs_type = self) ⇒ Object
6657
6658
6659
6660
6661
|
# File 'lib/adlint/cc1/type.rb', line 6657
def _arithmetic_type_with_union(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unresolved(lhs_type, rhs_type = self) ⇒ Object
6381
6382
6383
|
# File 'lib/adlint/cc1/type.rb', line 6381
def _arithmetic_type_with_unresolved(lhs_type, rhs_type = self)
rhs_type.arithmetic_type_with(lhs_type)
end
|
#_arithmetic_type_with_unsigned(lhs_type, rhs_type = self) ⇒ Object
6488
6489
6490
6491
6492
6493
6494
|
# File 'lib/adlint/cc1/type.rb', line 6488
def _arithmetic_type_with_unsigned(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self) ⇒ Object
6409
6410
6411
6412
6413
6414
6415
|
# File 'lib/adlint/cc1/type.rb', line 6409
def _arithmetic_type_with_unsigned_char(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self) ⇒ Object
6496
6497
6498
6499
6500
6501
6502
|
# File 'lib/adlint/cc1/type.rb', line 6496
def _arithmetic_type_with_unsigned_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self) ⇒ Object
6519
6520
6521
6522
6523
6524
6525
|
# File 'lib/adlint/cc1/type.rb', line 6519
def _arithmetic_type_with_unsigned_long(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self) ⇒ Object
6543
6544
6545
6546
6547
6548
6549
|
# File 'lib/adlint/cc1/type.rb', line 6543
def _arithmetic_type_with_unsigned_long_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self) ⇒ Object
6567
6568
6569
6570
6571
6572
6573
|
# File 'lib/adlint/cc1/type.rb', line 6567
def _arithmetic_type_with_unsigned_long_long(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self) ⇒ Object
6591
6592
6593
6594
6595
6596
6597
|
# File 'lib/adlint/cc1/type.rb', line 6591
def _arithmetic_type_with_unsigned_long_long_int(lhs_type, rhs_type = self)
lhs_type end
|
#_arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self) ⇒ Object
6433
6434
6435
6436
6437
6438
6439
|
# File 'lib/adlint/cc1/type.rb', line 6433
def _arithmetic_type_with_unsigned_short(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self) ⇒ Object
6457
6458
6459
6460
6461
6462
6463
|
# File 'lib/adlint/cc1/type.rb', line 6457
def _arithmetic_type_with_unsigned_short_int(lhs_type, rhs_type = self)
lhs_type.integer_promoted_type end
|
#_arithmetic_type_with_void(lhs_type, rhs_type = self) ⇒ Object
6385
6386
6387
|
# File 'lib/adlint/cc1/type.rb', line 6385
def _arithmetic_type_with_void(lhs_type, rhs_type = self)
rhs_type.arithmetic_type_with(lhs_type)
end
|
#aligned_bit_size ⇒ Object
6174
6175
6176
|
# File 'lib/adlint/cc1/type.rb', line 6174
def aligned_bit_size
@members.reduce(0) { |sum, memb| sum + memb.type.aligned_bit_size }
end
|
#arbitrary_value ⇒ Object
6328
6329
6330
|
# File 'lib/adlint/cc1/type.rb', line 6328
def arbitrary_value
CompositeValue.new(@members.map { |memb| memb.type.arbitrary_value })
end
|
6369
6370
6371
|
# File 'lib/adlint/cc1/type.rb', line 6369
def argument_promoted_type
self
end
|
#arithmetic_type_with(type) ⇒ Object
6373
6374
6375
|
# File 'lib/adlint/cc1/type.rb', line 6373
def arithmetic_type_with(type)
subclass_responsibility
end
|
#array? ⇒ Boolean
6219
6220
6221
|
# File 'lib/adlint/cc1/type.rb', line 6219
def array?
false
end
|
#base_type ⇒ Object
6182
6183
6184
|
# File 'lib/adlint/cc1/type.rb', line 6182
def base_type
nil
end
|
#bit_alignment ⇒ Object
6170
6171
6172
|
# File 'lib/adlint/cc1/type.rb', line 6170
def bit_alignment
bit_size
end
|
6166
6167
6168
|
# File 'lib/adlint/cc1/type.rb', line 6166
def bit_size
@members.reduce(0) { |sum, memb| sum + memb.type.bit_size }
end
|
#bitfield? ⇒ Boolean
6271
6272
6273
|
# File 'lib/adlint/cc1/type.rb', line 6271
def bitfield?
false
end
|
#brief_image ⇒ Object
6154
6155
6156
|
# File 'lib/adlint/cc1/type.rb', line 6154
def brief_image
subclass_responsibility
end
|
#coerce_array_value(val) ⇒ Object
6349
6350
6351
6352
|
# File 'lib/adlint/cc1/type.rb', line 6349
def coerce_array_value(val)
undefined_value end
|
#coerce_composite_value(val) ⇒ Object
6354
6355
6356
6357
6358
6359
|
# File 'lib/adlint/cc1/type.rb', line 6354
def coerce_composite_value(val)
vals = @members.zip(val.values).map { |memb, v|
v ? v.coerce_to(memb.type) : memb.type.undefined_value
}
CompositeValue.new(vals)
end
|
#coerce_scalar_value(val) ⇒ Object
6344
6345
6346
6347
|
# File 'lib/adlint/cc1/type.rb', line 6344
def coerce_scalar_value(val)
undefined_value end
|
#coercible?(to_type) ⇒ Boolean
6200
6201
6202
6203
6204
6205
|
# File 'lib/adlint/cc1/type.rb', line 6200
def coercible?(to_type)
to_type.composite? &&
@members.zip(to_type.members).all? { |lhs_memb, rhs_memb|
rhs_memb && lhs_memb.type.coercible?(rhs_memb.type)
}
end
|
#compatible?(to_type) ⇒ Boolean
6194
6195
6196
6197
6198
|
# File 'lib/adlint/cc1/type.rb', line 6194
def compatible?(to_type)
to_type.composite? &&
@members.size == to_type.members.size &&
@members.zip(to_type.members).all? { |lhs, rhs| lhs.compatible?(rhs) }
end
|
#const? ⇒ Boolean
6259
6260
6261
|
# File 'lib/adlint/cc1/type.rb', line 6259
def const?
false
end
|
#corresponding_signed_type ⇒ Object
6671
6672
6673
|
# File 'lib/adlint/cc1/type.rb', line 6671
def corresponding_signed_type
self end
|
#corresponding_unsigned_type ⇒ Object
6675
6676
6677
|
# File 'lib/adlint/cc1/type.rb', line 6675
def corresponding_unsigned_type
self end
|
6679
6680
6681
6682
|
# File 'lib/adlint/cc1/type.rb', line 6679
def dup
self.class.new(type_table, declarations.first,
@members.map { |memb| memb.dup })
end
|
#enum? ⇒ Boolean
6235
6236
6237
|
# File 'lib/adlint/cc1/type.rb', line 6235
def enum?
false
end
|
#enumerators ⇒ Object
6295
6296
6297
|
# File 'lib/adlint/cc1/type.rb', line 6295
def enumerators
[]
end
|
#explicitly_signed? ⇒ Boolean
6279
6280
6281
|
# File 'lib/adlint/cc1/type.rb', line 6279
def explicitly_signed?
false
end
|
#floating? ⇒ Boolean
6215
6216
6217
|
# File 'lib/adlint/cc1/type.rb', line 6215
def floating?
false
end
|
#function? ⇒ Boolean
6231
6232
6233
|
# File 'lib/adlint/cc1/type.rb', line 6231
def function?
false
end
|
#have_va_list? ⇒ Boolean
6283
6284
6285
|
# File 'lib/adlint/cc1/type.rb', line 6283
def have_va_list?
false
end
|
6146
6147
6148
|
# File 'lib/adlint/cc1/type.rb', line 6146
def id
subclass_responsibility
end
|
6150
6151
6152
|
# File 'lib/adlint/cc1/type.rb', line 6150
def image
subclass_responsibility
end
|
#impl_length ⇒ Object
6303
6304
6305
|
# File 'lib/adlint/cc1/type.rb', line 6303
def impl_length
0
end
|
#incomplete? ⇒ Boolean
6190
6191
6192
|
# File 'lib/adlint/cc1/type.rb', line 6190
def incomplete?
declarations.all? { |dcl| dcl.struct_declarations.nil? }
end
|
#integer? ⇒ Boolean
6211
6212
6213
|
# File 'lib/adlint/cc1/type.rb', line 6211
def integer?
false
end
|
#integer_conversion_rank ⇒ Object
6361
6362
6363
|
# File 'lib/adlint/cc1/type.rb', line 6361
def integer_conversion_rank
0 end
|
6365
6366
6367
|
# File 'lib/adlint/cc1/type.rb', line 6365
def integer_promoted_type
self end
|
6299
6300
6301
|
# File 'lib/adlint/cc1/type.rb', line 6299
def length
0
end
|
6158
6159
6160
|
# File 'lib/adlint/cc1/type.rb', line 6158
def location
subclass_responsibility
end
|
6316
6317
6318
|
# File 'lib/adlint/cc1/type.rb', line 6316
def max
0
end
|
#member_named(name) ⇒ Object
6307
6308
6309
6310
|
# File 'lib/adlint/cc1/type.rb', line 6307
def member_named(name)
@members.find { |memb| memb.name == name }
end
|
6312
6313
6314
|
# File 'lib/adlint/cc1/type.rb', line 6312
def min
0
end
|
#named? ⇒ Boolean
6162
6163
6164
|
# File 'lib/adlint/cc1/type.rb', line 6162
def named?
subclass_responsibility
end
|
#nil_value ⇒ Object
6320
6321
6322
|
# File 'lib/adlint/cc1/type.rb', line 6320
def nil_value
CompositeValue.new(@members.map { |memb| memb.type.nil_value })
end
|
#parameter_types ⇒ Object
6291
6292
6293
|
# File 'lib/adlint/cc1/type.rb', line 6291
def parameter_types
[]
end
|
#parameter_value ⇒ Object
6336
6337
6338
|
# File 'lib/adlint/cc1/type.rb', line 6336
def parameter_value
CompositeValue.new(@members.map { |memb| memb.type.parameter_value })
end
|
#pointer? ⇒ Boolean
6223
6224
6225
|
# File 'lib/adlint/cc1/type.rb', line 6223
def pointer?
false
end
|
#qualified? ⇒ Boolean
6227
6228
6229
|
# File 'lib/adlint/cc1/type.rb', line 6227
def qualified?
false
end
|
#real_type ⇒ Object
6178
6179
6180
|
# File 'lib/adlint/cc1/type.rb', line 6178
def real_type
self
end
|
#restrict? ⇒ Boolean
6267
6268
6269
|
# File 'lib/adlint/cc1/type.rb', line 6267
def restrict?
false
end
|
#return_type ⇒ Object
6287
6288
6289
|
# File 'lib/adlint/cc1/type.rb', line 6287
def return_type
nil
end
|
#return_value ⇒ Object
6340
6341
6342
|
# File 'lib/adlint/cc1/type.rb', line 6340
def return_value
CompositeValue.new(@members.map { |memb| memb.type.return_value })
end
|
#scalar? ⇒ Boolean
6207
6208
6209
|
# File 'lib/adlint/cc1/type.rb', line 6207
def scalar?
false
end
|
#signed? ⇒ Boolean
6275
6276
6277
|
# File 'lib/adlint/cc1/type.rb', line 6275
def signed?
false
end
|
#standard? ⇒ Boolean
6247
6248
6249
|
# File 'lib/adlint/cc1/type.rb', line 6247
def standard?
false
end
|
#undeclared? ⇒ Boolean
6251
6252
6253
|
# File 'lib/adlint/cc1/type.rb', line 6251
def undeclared?
@members.any? { |memb| memb.type.undeclared? }
end
|
#undefined_value ⇒ Object
6332
6333
6334
|
# File 'lib/adlint/cc1/type.rb', line 6332
def undefined_value
CompositeValue.new(@members.map { |memb| memb.type.undefined_value })
end
|
#unqualify ⇒ Object
6186
6187
6188
|
# File 'lib/adlint/cc1/type.rb', line 6186
def unqualify
self
end
|
#unresolved? ⇒ Boolean
6255
6256
6257
|
# File 'lib/adlint/cc1/type.rb', line 6255
def unresolved?
@members.any? { |memb| memb.type.unresolved? }
end
|
#user? ⇒ Boolean
6239
6240
6241
|
# File 'lib/adlint/cc1/type.rb', line 6239
def user?
false
end
|
#void? ⇒ Boolean
6243
6244
6245
|
# File 'lib/adlint/cc1/type.rb', line 6243
def void?
false
end
|
#volatile? ⇒ Boolean
6263
6264
6265
|
# File 'lib/adlint/cc1/type.rb', line 6263
def volatile?
false
end
|
#zero_value ⇒ Object
6324
6325
6326
|
# File 'lib/adlint/cc1/type.rb', line 6324
def zero_value
CompositeValue.new(@members.map { |memb| memb.type.zero_value })
end
|