Class: Rbind::RPointer
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Rbind::RPointer
- Defined in:
- lib/rbind/core/rpointer.rb
Instance Attribute Summary collapse
-
#const ⇒ Object
Returns the value of attribute const.
Instance Method Summary collapse
- #csignature(sig = nil) ⇒ Object
- #full_name ⇒ Object
- #generate_signatures ⇒ Object
-
#initialize(type) ⇒ RPointer
constructor
A new instance of RPointer.
- #name ⇒ Object
- #ptr? ⇒ Boolean
- #raw? ⇒ Boolean
- #ref? ⇒ Boolean
- #remove_const ⇒ Object
- #signature(sig = nil) ⇒ Object
- #to_const ⇒ Object
- #to_ptr ⇒ Object
- #to_ref ⇒ Object
Constructor Details
#initialize(type) ⇒ RPointer
Returns a new instance of RPointer.
7 8 9 |
# File 'lib/rbind/core/rpointer.rb', line 7 def initialize(type) super(type) end |
Instance Attribute Details
#const ⇒ Object
Returns the value of attribute const.
5 6 7 |
# File 'lib/rbind/core/rpointer.rb', line 5 def const @const end |
Instance Method Details
#csignature(sig = nil) ⇒ Object
23 24 25 |
# File 'lib/rbind/core/rpointer.rb', line 23 def csignature(sig=nil) super.to_s + "*" end |
#full_name ⇒ Object
15 16 17 |
# File 'lib/rbind/core/rpointer.rb', line 15 def full_name super.to_s + "*" end |
#generate_signatures ⇒ Object
64 65 66 67 68 |
# File 'lib/rbind/core/rpointer.rb', line 64 def generate_signatures __getobj__.generate_signatures.map do |s| s + "*" end end |
#name ⇒ Object
11 12 13 |
# File 'lib/rbind/core/rpointer.rb', line 11 def name super.to_s + "*" end |
#ptr? ⇒ Boolean
27 28 29 |
# File 'lib/rbind/core/rpointer.rb', line 27 def ptr? true end |
#raw? ⇒ Boolean
35 36 37 |
# File 'lib/rbind/core/rpointer.rb', line 35 def raw? false end |
#ref? ⇒ Boolean
31 32 33 |
# File 'lib/rbind/core/rpointer.rb', line 31 def ref? false end |
#remove_const ⇒ Object
39 40 41 |
# File 'lib/rbind/core/rpointer.rb', line 39 def remove_const RPointer.new __getobj__.remove_const end |
#signature(sig = nil) ⇒ Object
19 20 21 |
# File 'lib/rbind/core/rpointer.rb', line 19 def signature(sig=nil) super.to_s + "*" end |
#to_const ⇒ Object
51 52 53 54 |
# File 'lib/rbind/core/rpointer.rb', line 51 def to_const return self if const? RTypeQualifier.new(self,:const => true) end |
#to_ptr ⇒ Object
43 44 45 |
# File 'lib/rbind/core/rpointer.rb', line 43 def to_ptr RPointer.new(self) end |
#to_ref ⇒ Object
47 48 49 |
# File 'lib/rbind/core/rpointer.rb', line 47 def to_ref RReference.new(self) end |