new(addr, types, func = nil) Class Public methods Wraps the C pointer addr as a C struct with the given types. The C function func is called when the instance is garbage collected. See also DL::CPtr.new
size(types) Class Public methods Given types, returns the offset for the packed sizes of those types DL::CStructEntity.size([DL::TYPE_DOUBLE, DL::TYPE_INT, DL::TYPE_CHAR, DL::TYPE_VOIDP]) => 24
[](name) Instance Public methods Fetch struct member name
[]=(name, val) Instance Public methods Set struct member name, to value val
assign_names(members) Instance Public methods Set the names of the members in this C struct
set_ctypes(types) Instance Public methods Given types, calculate the offsets and sizes for the types in the struct.
entity_class() Class Public methods accessor to DL::CUnionEntity
malloc(types, func=nil) Class Public methods Allocates a C union the types provided. The C function func is called when the instance is garbage collected.
size(types) Class Public methods Given types, returns the size needed for the union. DL::CUnionEntity.size([DL::TYPE_DOUBLE, DL::TYPE_INT, DL::TYPE_CHAR, DL::TYPE_VOIDP]) => 8
set_ctypes(types) Instance Public methods Given types, calculate the necessary offset and for each union member
Page 179 of 11844