Parent

FFI::StructGenerator::Field

A field in a Struct.

Attributes

name[R]
type[R]
offset[R]
size[RW]

Public Class Methods

new(name, type) click to toggle source
     # File lib/ffi/tools/struct_generator.rb, line 172
172:     def initialize(name, type)
173:       @name = name
174:       @type = type
175:       @offset = nil
176:       @size = nil
177:     end

Public Instance Methods

offset=(o) click to toggle source
     # File lib/ffi/tools/struct_generator.rb, line 179
179:     def offset=(o)
180:       @offset = o
181:     end
to_config(name) click to toggle source
     # File lib/ffi/tools/struct_generator.rb, line 183
183:     def to_config(name)
184:       buf = []
185:       buf << "rbx.platform.#{name}.#{@name}.offset = #{@offset}"
186:       buf << "rbx.platform.#{name}.#{@name}.size = #{@size}"
187:       buf << "rbx.platform.#{name}.#{@name}.type = #{@type}" if @type
188:       buf
189:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.