indexing
	description: "Transactions consisting out of a single transfer"
	status: "See note at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	SINGLE_TRANSACTION

create 

	make (s, t: DATA_RESOURCE)
			-- Create transaction.
		require
			source_exists: s /= void
			target_exists: t /= void
		ensure
			source_set: source = s
			target_set: target = t
			read_mode_set: source.read_mode
			write_mode_set: target.write_mode

feature -- Access

	source: DATA_RESOURCE
			-- Current source

	target: DATA_RESOURCE
			-- Current target
	
feature -- Measurement

	Count: INTEGER is 1
			-- Number of transactions (Always 1)
	
feature -- Status report

	error: BOOLEAN
			-- Has an error occurred in current transaction?
			-- (from TRANSACTION)

	is_correct: BOOLEAN
			-- Is transaction set up correctly?

	succeeded: BOOLEAN
			-- Has the transaction succeeded?
	
feature -- Status setting

	reset_error
			-- Reset error flags.
	
feature -- Basic operations

	execute
			-- Execute transaction.
		require -- from TRANSACTION
			correct_transaction: is_correct
	
invariant

		-- from ANY
	reflexive_equality: standard_is_equal (Current)
	reflexive_conformance: conforms_to (Current)

end -- class SINGLE_TRANSACTION