Class: Rbind::RReference
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Rbind::RReference
- Defined in:
- lib/rbind/core/rreference.rb
Instance Attribute Summary collapse
-
#const ⇒ Object
Returns the value of attribute const.
Instance Method Summary collapse
- #csignature(sig = nil) ⇒ Object
- #generate_signatures ⇒ Object
-
#initialize(type) ⇒ RReference
constructor
A new instance of RReference.
- #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) ⇒ RReference
Returns a new instance of RReference.
7 8 9 |
# File 'lib/rbind/core/rreference.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/rreference.rb', line 5 def const @const end |
Instance Method Details
#csignature(sig = nil) ⇒ Object
44 45 46 |
# File 'lib/rbind/core/rreference.rb', line 44 def csignature(sig=nil) generate_signatures[1] end |
#generate_signatures ⇒ Object
48 49 50 51 52 |
# File 'lib/rbind/core/rreference.rb', line 48 def generate_signatures __getobj__.generate_signatures.map do |s| s + "&" end end |
#ptr? ⇒ Boolean
15 16 17 |
# File 'lib/rbind/core/rreference.rb', line 15 def ptr? false end |
#raw? ⇒ Boolean
19 20 21 |
# File 'lib/rbind/core/rreference.rb', line 19 def raw? false end |
#ref? ⇒ Boolean
11 12 13 |
# File 'lib/rbind/core/rreference.rb', line 11 def ref? true end |
#remove_const ⇒ Object
36 37 38 |
# File 'lib/rbind/core/rreference.rb', line 36 def remove_const RReference.new __getobj__.remove_const end |
#signature(sig = nil) ⇒ Object
40 41 42 |
# File 'lib/rbind/core/rreference.rb', line 40 def signature(sig=nil) generate_signatures[0] end |
#to_const ⇒ Object
31 32 33 34 |
# File 'lib/rbind/core/rreference.rb', line 31 def to_const return self if const? RTypeQualifier.new(self,:const => true) end |
#to_ptr ⇒ Object
23 24 25 |
# File 'lib/rbind/core/rreference.rb', line 23 def to_ptr RPointer.new(self) end |
#to_ref ⇒ Object
27 28 29 |
# File 'lib/rbind/core/rreference.rb', line 27 def to_ref RReference.new(self) end |