Class SimpleZDB::FilterInfo
In: lib/simplezdb/filterinfo.rb
Parent: Object

Use with SimpleZDB::DataBase#filter. Currently supports uchar and time fields only. thanks to qualendar/src/sysdep/qualendareventdbbox.cpp by ichitokumei

Example: Selecting non-repeating events

  db = DataBase.new(DataBase::DATEBOOK)
  fi = SimpleZDB::FilterInfo.new(db.item_info)
  fi.add('RTYP', :eq, 0xff)
  db.filter(fi.to_exp, nil, DataBase::FOR_MASTER_INDEX)
  db.each do |card|
    # ...
  end

Methods

add   new   to_exp  

Constants

B_OPERATOR = { :eq => 0x90, :ge => 0x98, :gt => 0x99, # ??? :le => 0x9a, :lt => 0x9b, }
B_VALUE_TYPE = { ItemInfo::UCHAR => 0x0b, ItemInfo::TIME => 0x04, }
B_AND = [0xfe, 0x86]

Public Class methods

Public Instance methods

Generate filterExp for the first argument of SimpleZDB::DataBase#filter.

[Validate]