class FFI::Enum

def [](query)

def [](query)
  case query
  when Symbol
    @kv_map[query]
  when Integer
    @vk_map[query]
  end
end

def initialize(info, tag=nil)

def initialize(info, tag=nil)
  @tag = tag
  @kv_map = Hash.new
  @vk_map = Hash.new
  unless info.nil?
    last_cst = nil
    value = 0
    info.each do |i|
      case i
      when Symbol
        @kv_map[i] = value
        @vk_map[value] = i
        last_cst = i
        value += 1
      when Integer
        @kv_map[last_cst] = i
        @vk_map[i] = last_cst
        value = i+1
      end
    end
  end
end

def symbol_map

def symbol_map
  @kv_map
end

def symbols

def symbols
  @kv_map.keys
end