class TurboRex::CStruct::NativeStructProxy

Attributes

name[R]
size[R]
sizeof[R]
struct[R]

Public Class Methods

new(parser, name) click to toggle source
# File lib/turborex/cstruct.rb, line 545
def initialize(parser, name)
  @parser = parser
  @name = name
  @size = @sizeof = parser.sizeof(parser.find_c_struct(name))
end

Public Instance Methods

from_str(str, offset = 0) click to toggle source
# File lib/turborex/cstruct.rb, line 551
def from_str(str, offset = 0)
  struct = @parser.find_c_struct(@name)
  @struct = ::Metasm::C::AllocCStruct.new(@parser, struct, str, offset)
end
method_missing(m, *args, &block) click to toggle source
# File lib/turborex/cstruct.rb, line 560
def method_missing(m, *args, &block)
  @struct.send(m, *args, &block)
end
to_s() click to toggle source
# File lib/turborex/cstruct.rb, line 556
def to_s
  @struct.str
end