Class | FFI::StructLayoutBuilder |
In: |
lib/ffi/struct_layout_builder.rb
|
Parent: | Object |
Build a {StructLayout struct layout}.
NUMBER_TYPES | = | [ Type::INT8, Type::UINT8, Type::INT16, Type::UINT16, Type::INT32, Type::UINT32, Type::LONG, Type::ULONG, Type::INT64, Type::UINT64, Type::FLOAT32, Type::FLOAT64, Type::LONGDOUBLE, Type::BOOL, ] | List of number types |
alignment | [R] | |
size | [R] |
@param [String, Symbol] name name of the field @param [Array, DataConverter, Struct, StructLayout::Field, Symbol, Type] type type of the field @param [Numeric, nil] offset @return [self] Add a field to the builder. @note Setting offset to nil or +-1+ is equivalent to +0+.
@param [Numeric] alignment Set alignment attribute with alignment only if it is greater than attribute value.