indexing
	description: "Command history entries storing multiple commands"
	author: "Patrick Schoenbach"

class interface
	MULTIPLE_COMMAND_ENTRY

create 

	make (l: LINEAR_CONTAINER [COMMAND_INSTANCE])
		require
			source_list_exists: l /= void;
			source_list_not_empty: not l.empty
		ensure
			destination_list_at_end: list.islast

feature -- Status report

	is_executed: BOOLEAN
			-- Has entry been executed?

	redoable_item: BOOLEAN
			-- Is there a redoable item?
			-- (from COMMAND_HISTORY_ENTRY)

	undoable_item: BOOLEAN
			-- Is there an undoable item?
			-- (from COMMAND_HISTORY_ENTRY)
	
feature -- Basic operations

	redo
			-- Redo all commands in entry

	undo
			-- Undo all commands in entry.
	
invariant

		-- from GENERAL
	reflexive_equality: standard_is_equal (Current);
	reflexive_conformance: conforms_to (Current);

end -- class MULTIPLE_COMMAND_ENTRY