Class: DescriptorType
- Inherits:
-
Type
show all
- Defined in:
- lib/tecsgen/core/types.rb
Overview
DescriptorType クラス
動的結合で渡すデスクリプタ型
Constant Summary
collapse
- @@descriptors =
@sinagure_nsp::NamespacePath
{}
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Type
#cast, #check_struct_tag, #clear_max, #equal?, #get_ID_str, #get_bit_size, #get_original_type, #has_pointer?, #has_sized_pointer?, #has_unsized_string?, #is_const?, #is_void?, #is_volatile?, #print_info, #print_info_post, print_info_post, reset_print_info, #set_scs, #show_tree
Methods inherited from Node
#cdl_error, #cdl_error2, #cdl_error3, #cdl_info, #cdl_info2, #cdl_warning, #cdl_warning2, #get_locale, #locale_str, #set_locale
Constructor Details
#initialize(signature_nsp) ⇒ DescriptorType
Returns a new instance of DescriptorType.
1565
1566
1567
1568
1569
|
# File 'lib/tecsgen/core/types.rb', line 1565
def initialize(signature_nsp)
@signature_nsp = signature_nsp
@@descriptors[self] = false
end
|
Class Method Details
.check_signature ⇒ Object
1595
1596
1597
1598
1599
1600
1601
1602
|
# File 'lib/tecsgen/core/types.rb', line 1595
def self.check_signature
@@descriptors.each{|desc, val|
if val != true
desc.check_signature
@@descriptors[desc] = true
end
}
end
|
Instance Method Details
1583
1584
|
# File 'lib/tecsgen/core/types.rb', line 1583
def check
end
|
#check_init(locale, ident, initializer, kind, attribute = nil) ⇒ Object
1586
1587
1588
1589
1590
1591
1592
1593
|
# File 'lib/tecsgen/core/types.rb', line 1586
def check_init(locale, ident, initializer, kind, attribute = nil)
case kind
when :PARAMETER
else
cdl_error2(locale, "T9999 Descriptor cannot be used for $1", kind)
end
end
|
#check_signature ⇒ Object
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
|
# File 'lib/tecsgen/core/types.rb', line 1604
def check_signature
obj = Namespace.find @signature_nsp
if !obj.is_a? Signature
cdl_error("T9999 '$1': not signature or not found", @signature_nsp.to_s)
else
if obj.has_descriptor?
end
end
end
|
#get_signature ⇒ Object
1618
1619
1620
|
# File 'lib/tecsgen/core/types.rb', line 1618
def get_signature
Namespace.find @signature_nsp
end
|
#get_type_str ⇒ Object
1571
1572
1573
|
# File 'lib/tecsgen/core/types.rb', line 1571
def get_type_str
"Descriptor( #{@signature_nsp.get_global_name} )"
end
|
#get_type_str_post ⇒ Object
1575
1576
1577
|
# File 'lib/tecsgen/core/types.rb', line 1575
def get_type_str_post
""
end
|
#set_qualifier(qualifier) ⇒ Object
1579
1580
1581
|
# File 'lib/tecsgen/core/types.rb', line 1579
def set_qualifier(qualifier)
cdl_error("T9999 '$1' cannot be specified for Descriptor", qualfier.to_s)
end
|