class Ronin::Support::Binary::CTypes::UnionType::Member
Represents a member within a union.
@api private
@since 1.0.0
Attributes
The type of the member.
@return [Type]
Public Class Methods
Source
# File lib/ronin/support/binary/ctypes/union_type.rb, line 54 def initialize(type) @type = type end
Initializes the member.
@param [Type] type
The type of the member.
Public Instance Methods
Source
# File lib/ronin/support/binary/ctypes/union_type.rb, line 84 def alignment @type.alignment end
The alignment, in bytes, of the member within the union.
@return [Integer]
Source
# File lib/ronin/support/binary/ctypes/union_type.rb, line 66 def offset 0 end
The offset of the member within the union.
@return [0]
@note This method is mainly for compatibility with {StructType::Member#offset}.
Source
# File lib/ronin/support/binary/ctypes/union_type.rb, line 75 def size @type.size end
The size, in bytes, of the member within the union.
@return [Integer]