Class: Rbind::RPointer

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/rbind/core/rpointer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#constObject

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_nameObject



15
16
17
# File 'lib/rbind/core/rpointer.rb', line 15

def full_name
    super.to_s + "*"
end

#generate_signaturesObject



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

#nameObject



11
12
13
# File 'lib/rbind/core/rpointer.rb', line 11

def name
    super.to_s + "*"
end

#ptr?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/rbind/core/rpointer.rb', line 27

def ptr?
    true
end

#raw?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/rbind/core/rpointer.rb', line 35

def raw?
    false
end

#ref?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/rbind/core/rpointer.rb', line 31

def ref?
    false
end

#remove_constObject



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_constObject



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_ptrObject



43
44
45
# File 'lib/rbind/core/rpointer.rb', line 43

def to_ptr
    RPointer.new(self)
end

#to_refObject



47
48
49
# File 'lib/rbind/core/rpointer.rb', line 47

def to_ref
    RReference.new(self)
end