indexing description: "Objects that ..." author: "" date: "$Date$" revision: "$Revision$" deferred class XML_BASE_LIST [T -> XML_NODE] inherit LINKED_LIST [T] rename make as make_list, append as append_list export {XML_NODE} all {ANY} extendible, has, start, off, after, forth, item, is_empty, i_th, index_of, first, last, count, wipe_out, for_all, do_all, do_if end feature -- Creation make (a_parent: XML_NODE) is -- creates a new XML_BASE_LIST do make_list parent := a_parent create insert_actions end feature -- {LINKED_LIST} append (v: T) is -- overridden from LINKED_LIST to allow some validity checks require same_document: parent = Void or else (v.owner_document = Void or parent.owner_document = v.owner_document) do if parent /= Void and v.parent /= Void then v.remove_from_tree end extend (v) if parent /= Void then v.set_parent (parent) end insert_actions.call ([v]) ensure is_inserted: has (v) inserted_has_parent: parent = Void or else parent = v.parent end replace_child (child, new: T) is -- local c: CURSOR do c := cursor start search (child) if not exhausted then child.remove_from_tree if parent /= Void and new.parent /= Void then new.remove_from_tree end extend (new) if parent /= Void then new.set_parent (parent) end insert_actions.call ([new]) end go_to (c) end feature -- Access insert_actions: ACTION_SEQUENCE[TUPLE[T]] parent: XML_NODE end