Class: Inline::C::Type
- Inherits:
-
Object
- Object
- Inline::C::Type
- Defined in:
- lib/inline_acceleration.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#c_type ⇒ Object
readonly
Returns the value of attribute c_type.
-
#ruby_type_class ⇒ Object
readonly
Returns the value of attribute ruby_type_class.
Instance Method Summary collapse
- #c_transfer_type ⇒ Object
-
#initialize(c_type, ruby_type_class) ⇒ Type
constructor
A new instance of Type.
- #ruby_type_conversion ⇒ Object
- #void? ⇒ Boolean
Constructor Details
#initialize(c_type, ruby_type_class) ⇒ Type
Returns a new instance of Type.
327 328 329 330 |
# File 'lib/inline_acceleration.rb', line 327 def initialize(c_type, ruby_type_class) @c_type = c_type @ruby_type_class = ruby_type_class end |
Instance Attribute Details
#c_type ⇒ Object (readonly)
Returns the value of attribute c_type.
332 333 334 |
# File 'lib/inline_acceleration.rb', line 332 def c_type @c_type end |
#ruby_type_class ⇒ Object (readonly)
Returns the value of attribute ruby_type_class.
332 333 334 |
# File 'lib/inline_acceleration.rb', line 332 def ruby_type_class @ruby_type_class end |
Instance Method Details
#c_transfer_type ⇒ Object
346 347 348 |
# File 'lib/inline_acceleration.rb', line 346 def c_transfer_type is_simple_type? ? c_type : TRANSFER_TYPE end |
#ruby_type_conversion ⇒ Object
350 351 352 |
# File 'lib/inline_acceleration.rb', line 350 def ruby_type_conversion is_simple_type? ? '' : "#{ruby_type_class.name}.new" end |
#void? ⇒ Boolean
342 343 344 |
# File 'lib/inline_acceleration.rb', line 342 def void? c_type == 'void' end |