Methods
Constants
TreeTagID_TBL | = | TkCore::INTERP.create_table |
TreeTag_ID | = | ['blt_tree_tag'.freeze, TkUtil.untrust('00000')]).instance_eval{ @mutex = Mutex.new |
Class Public methods
id2obj(tree, id)
Link
# File ext/tk/lib/tkextlib/blt/tree.rb, line 281 def self.id2obj(tree, id) tpath = tree.path TreeTagID_TBL.mutex.synchronize{ if TreeTagID_TBL[tpath] if TreeTagID_TBL[tpath][id] TreeTagID_TBL[tpath][id] else begin # self.new(tree, id) (obj = self.allocate).instance_eval{ @parent = @tree = tree @tpath = @parent.path @path = @id = id.dup.freeze if id TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] TreeTagID_TBL[@tpath][@id] = self } obj rescue id end end else id end } end
new(tree, tag_str = nil)
Link
# File ext/tk/lib/tkextlib/blt/tree.rb, line 308 def initialize(tree, tag_str = nil) @parent = @tree = tree @tpath = @parent.path if tag_str @path = @id = tag_str.dup.freeze else TreeTag_ID.mutex.synchronize{ @path = @id = TreeTag_ID.join(TkCore::INTERP._ip_id_) TreeTag_ID[1].succ! } end TreeTagID_TBL.mutex.synchronize{ TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] TreeTagID_TBL[@tpath][@id] = self } end
Instance Public methods
add(*nodes)
Link
delete(*nodes)
Link
forget()
Link
mutex()
Link
nodes()
Link
set(node)
Link