Class: FFI::Clang::Types::Function
- Inherits:
-
Type
- Object
- Type
- FFI::Clang::Types::Function
show all
- Includes:
- Enumerable
- Defined in:
- lib/ffi/clang/types/function.rb
Instance Attribute Summary
Attributes inherited from Type
#translation_unit, #type
Instance Method Summary
collapse
Methods inherited from Type
#==, #alignof, #const_qualified?, create, #declaration, #initialize, #kind, #kind_spelling, #non_reference_type, #pod?, #ref_qualifier, #restrict_qualified?, #sizeof, #spelling, #to_s, #volatile_qualified?
Instance Method Details
#arg_type(i) ⇒ Object
15
16
17
|
# File 'lib/ffi/clang/types/function.rb', line 15
def arg_type(i)
Type.create Lib.get_arg_type(@type, i), @translation_unit
end
|
#arg_types ⇒ Object
19
20
21
22
23
24
25
26
27
|
# File 'lib/ffi/clang/types/function.rb', line 19
def arg_types
return to_enum(:arg_types) unless block_given?
self.args_size.times do |i|
yield self.arg_type(i)
end
self
end
|
#args_size ⇒ Object
11
12
13
|
# File 'lib/ffi/clang/types/function.rb', line 11
def args_size
Lib.get_num_arg_types(@type)
end
|
#calling_conv ⇒ Object
33
34
35
|
# File 'lib/ffi/clang/types/function.rb', line 33
def calling_conv
Lib.get_fuction_type_calling_conv(@type)
end
|
#exception_specification ⇒ Object
37
38
39
|
# File 'lib/ffi/clang/types/function.rb', line 37
def exception_specification
Lib.get_exception_specification_type(@type)
end
|
#result_type ⇒ Object
29
30
31
|
# File 'lib/ffi/clang/types/function.rb', line 29
def result_type
Type.create Lib.get_result_type(@type), @translation_unit
end
|
#variadic? ⇒ Boolean
7
8
9
|
# File 'lib/ffi/clang/types/function.rb', line 7
def variadic?
Lib.is_function_type_variadic(@type) != 0
end
|