Class: FFIGen::PointerType
- Defined in:
- lib/ffi_gen.rb,
lib/ffi_gen/java_output.rb,
lib/ffi_gen/ruby_output.rb
Instance Attribute Summary collapse
-
#depth ⇒ Object
readonly
Returns the value of attribute depth.
-
#pointee_name ⇒ Object
readonly
Returns the value of attribute pointee_name.
-
#pointee_type ⇒ Object
readonly
Returns the value of attribute pointee_type.
Instance Method Summary collapse
-
#initialize(pointee_type, pointee_name, depth) ⇒ PointerType
constructor
A new instance of PointerType.
- #java_description ⇒ Object
- #java_jna_type ⇒ Object
- #java_name ⇒ Object
- #name ⇒ Object
- #ruby_description ⇒ Object
- #ruby_ffi_type ⇒ Object
- #ruby_name ⇒ Object
Constructor Details
#initialize(pointee_type, pointee_name, depth) ⇒ PointerType
Returns a new instance of PointerType.
250 251 252 253 254 |
# File 'lib/ffi_gen.rb', line 250 def initialize(pointee_type, pointee_name, depth) @pointee_type = pointee_type @pointee_name = pointee_name @depth = depth end |
Instance Attribute Details
#depth ⇒ Object (readonly)
Returns the value of attribute depth.
248 249 250 |
# File 'lib/ffi_gen.rb', line 248 def depth @depth end |
#pointee_name ⇒ Object (readonly)
Returns the value of attribute pointee_name.
248 249 250 |
# File 'lib/ffi_gen.rb', line 248 def pointee_name @pointee_name end |
#pointee_type ⇒ Object (readonly)
Returns the value of attribute pointee_type.
248 249 250 |
# File 'lib/ffi_gen.rb', line 248 def pointee_type @pointee_type end |
Instance Method Details
#java_description ⇒ Object
359 360 361 |
# File 'lib/ffi_gen/java_output.rb', line 359 def java_description "FFI::Pointer(#{'*' * @depth}#{@pointee_name ? @pointee_name.to_java_classname : ''})" end |
#java_jna_type ⇒ Object
355 356 357 |
# File 'lib/ffi_gen/java_output.rb', line 355 def java_jna_type "Pointer" end |
#java_name ⇒ Object
351 352 353 |
# File 'lib/ffi_gen/java_output.rb', line 351 def java_name @pointee_name.to_java_downcase end |
#name ⇒ Object
256 257 258 |
# File 'lib/ffi_gen.rb', line 256 def name @pointee_name end |
#ruby_description ⇒ Object
286 287 288 |
# File 'lib/ffi_gen/ruby_output.rb', line 286 def ruby_description "FFI::Pointer(#{'*' * @depth}#{@pointee_name ? @pointee_name.to_ruby_classname : ''})" end |
#ruby_ffi_type ⇒ Object
282 283 284 |
# File 'lib/ffi_gen/ruby_output.rb', line 282 def ruby_ffi_type ":pointer" end |
#ruby_name ⇒ Object
278 279 280 |
# File 'lib/ffi_gen/ruby_output.rb', line 278 def ruby_name @pointee_name.to_ruby_downcase end |