class FFI::StructLayout::Enum

An enum {Field} in a {StructLayout}.

def get(ptr)

Returns:
  • (Object) -

Parameters:
  • ptr (AbstractMemory) -- pointer on a {Struct}
def get(ptr)
  type.find(ptr.get_int(offset))
end

def put(ptr, value)

Returns:
  • (nil) -

Parameters:
  • value () --
  • ptr (AbstractMemory) -- pointer on a {Struct}
def put(ptr, value)
  ptr.put_int(offset, type.find(value))
end