### Home Classes Methods

### In Files

- lib/ffi/struct.rb

### Parent

Field

### Methods

- #get
- #put

### Files

- Makefile
- LICENSE
- compile
- configure
- depcomp
- stamp-vti
- install-sh
- libtool-version
- mdate-sh
- missing

### Class/Module Index

Quicksearch

- FFI
- FFI::ArrayType
- FFI::AutoPointer
- FFI::AutoPointer::CallableReleaser
- FFI::AutoPointer::DefaultReleaser
- FFI::AutoPointer::Releaser
- FFI::ConstGenerator
- FFI::ConstGenerator::Constant
- FFI::DynamicLibrary
- FFI::DynamicLibrary::Symbol
- FFI::Enum
- FFI::Enums
- FFI::Function
- FFI::Generator
- FFI::Generator::Task
- FFI::IO
- FFI::ManagedStruct
- FFI::Platform
- FFI::PlatformError
- FFI::Pointer
- FFI::StrPtrConverter
- FFI::Struct
- FFI::Struct::InlineArray
- FFI::Struct::ManagedStructConverter
- FFI::StructByReference
- FFI::StructByValue
- FFI::StructGenerator
- FFI::StructGenerator::Field
- FFI::StructLayout
- FFI::StructLayout::Enum
- FFI::StructLayout::InnerStruct
- FFI::StructLayout::Mapped
- FFI::StructLayoutBuilder
- FFI::TypesGenerator
- FFI::Union
- FFI::VariadicInvoker

No matching classes.

# FFI::StructLayout::Enum

An enum {Field} in a {StructLayout}.

### Public Instance Methods

get(ptr) click to toggle source

@param [AbstractMemory] ptr pointer on a {Struct} @return [Object] Get an object of type {type} from memory pointed by `ptr`.

    # File lib/ffi/struct.rb, line 59
    def get(ptr)
      type.find(ptr.get_int(offset))
    end

put(ptr, value) click to toggle source

@param [AbstractMemory] ptr pointer on a {Struct} @param value @return [nil] Set `value` into memory pointed by `ptr`.

    # File lib/ffi/struct.rb, line 67
    def put(ptr, value)
      ptr.put_int(offset, type.find(value))
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.