Class: FFI::Generator::Type
Direct Known Subclasses
Defined Under Namespace
Classes: Declaration
Constant Summary collapse
- ArraySizeRE =
/([0-9\+\-\*\/\(\)]+)/
- ArrayRE =
/^a\(#{ArraySizeRE}\)/
Instance Attribute Summary collapse
-
#full_decl ⇒ Object
readonly
Returns the value of attribute full_decl.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(params = { }) ⇒ Type
constructor
A new instance of Type.
- #to_s ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(params = { }) ⇒ Type
Returns a new instance of Type.
44 45 46 47 48 49 50 51 |
# File 'lib/generator/type.rb', line 44 def initialize(params = { }) super params = { :declaration => get_full_decl, :typedefs => { } }.merge(params) @full_decl = params[:declaration] @typedefs = params[:typedefs] || { } @declaration = Declaration.new(@full_decl) @is_pointer = 0 end |
Instance Attribute Details
#full_decl ⇒ Object (readonly)
Returns the value of attribute full_decl.
4 5 6 |
# File 'lib/generator/type.rb', line 4 def full_decl @full_decl end |
Instance Method Details
#to_s ⇒ Object
52 53 54 |
# File 'lib/generator/type.rb', line 52 def to_s ffi_type_from(@full_decl) end |