Module: Minigraph::FFI

Extended by:
FFI::Library
Defined in:
lib/minigraph/ffi.rb,
lib/minigraph/ffi/mappy.rb,
lib/minigraph/ffi/constants.rb,
lib/minigraph/ffi/functions.rb

Overview

Native APIs

Defined Under Namespace

Classes: Cigar, GChain, GChains, GGOpt, Idx, IdxOpt, LChain, LLChain, MG128, MG128V, MG32V, MG64V, MapOpt, TBuf

Constant Summary collapse

M_SPLICE =
0x10
M_SR =
0x20
M_FRAG_MODE =
0x40
M_FRAG_MERGE =
0x80
M_FOR_ONLY =
0x100
M_REV_ONLY =
0x200
M_HEAP_SORT =
0x400
M_VERTEX_COOR =
0x800
M_ALL_CHAINS =
0x1000
M_PRINT_2ND =
0x2000
M_CAL_COV =
0x4000
M_RMQ =
0x8000
M_COPY_COMMENT =
0x10000
M_INDEPEND_SEG =
0x20000
M_NO_QUAL =
0x40000
M_2_IO_THREADS =
0x80000
M_SHOW_UNMAP =
0x100000
M_NO_COMP_PATH =
0x200000
M_NO_DIAG =
0x400000
M_WRITE_LCHAIN =
0x800000
M_WRITE_MZ =
0x1000000
M_SKIP_GCHECK =
0x2000000
M_CIGAR =
0x4000000
G_NONE =
0
G_GGSIMPLE =
1
G_NO_QOVLP =
0x1
G_CAL_COV =
0x2
G_NO_INV =
0x4
G_CALL =
0x8

Class Method Summary collapse

Class Method Details

.attach_functionObject

Continue even if some functions are not found.



17
18
19
20
21
# File 'lib/minigraph/ffi.rb', line 17

def self.attach_function(*)
  super
rescue ::FFI::NotFoundError => e
  warn e.message
end

.mg_opt_set(preset, io, mo, go) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/minigraph/ffi/functions.rb', line 18

def self.mg_opt_set(preset, io, mo, go)
  ptr = case preset
        when 0, nil
          ::FFI::Pointer.new(:int, 0)
        else
          ::FFI::MemoryPointer.from_string(preset.to_s)
        end
  mg_opt_set_raw(ptr, io, mo, go)
end