class Character
include UTF8Value
- include IDS_Module
+ include CharacterIDC
+ include CharacterIDS
def initialize(char_id)
raise if char_id.nil?
@utf8_mcs = itou8(@char_id)
@utf8_mcs.freeze
@feature = {}
- @check_all_done = nil
+ # @check_all_done = nil
end
attr_reader :char_id
attr_reader :utf8_mcs
en.to_er(self)
end
- def is_idc?
- 0x2ff0 <= @char_id && @char_id <= 0x2fff
+ def each_feature
+ cd = ChiseDB.instance
+ cd.each_feature {|f|
+ ft = cd.get_feature(f)
+ begin
+ v = ft.get_value(@char_id)
+ next if v.nil?
+ yield(f, v)
+ ensure
+ ft.close
+ end
+ }
end
- def idc_argument_number
- return 0 unless is_idc?
- return 3 if @char_id == 0x2ff2 || @char_id == 0x2ff3
- return 2
+ def hash_feature
+ h = {}
+ each_feature {|k, v|
+ h[k] = v
+ }
+ h
end
private
a = a.sub(/\Afrom-/, "<-")
a
end
+
end
end