indexing
	cluster: "demangler"
	namespace: "candidate"
	description: "Report errors in a `SYNCHRONISED_DIRECTORY' object."
	original_author: "Justin Finnerty"
	original_date: "July 2005"
	current_date: "$Date: 2005/09/30 06:49:12 $"
	current_author: "$Author: finnerty $"
	revision: "$Revision: 2.2 $"	
	-- $Log: debuz_report.e,v $
	-- Revision 2.2  2005/09/30 06:49:12  finnerty
	-- Finalised for alpha release with SE and VE compilers
	--
	-- Revision 2.1  2005/09/27 06:14:23  finnerty
	-- Updated to use GOBO and work with SE and VE
	--
	-- Revision 2.0  2005/08/26 23:31:39  finnerty
	-- == alpha version ==
	--
	-- Revision 1.1  2005/08/24 12:11:42  finnerty
	-- DUPLICATE_REPORT subtype to look for compressed/uncompressed pairs.
	--

class DEBUZ_REPORT
	-- Report errors in a `SYNCHRONISED_DIRECTORY' object. This report
	-- searches for compressed files that have a corresponding
	-- uncompressed file and checks whether they have the same content.

inherit
	DUPLICATE_REPORT
		redefine
			set_current_suffix
		end

creation {ANY}
	make_debuz_report
	
feature {ANY}
	-- Access
	label: UC_STRING is
		once
			!!Result.make_from_utf8 ("Remove uncompressed duplicates")
		end

	help: UC_STRING is
		once
			!!Result.make_from_utf8 ("This report analyses a directory for pairs %
			%of files that appear to be compressed and uncompressed %
			%versions. If these pairs have identical content then %
			%the report marks the uncompressed file for deletion.")
		end

	config_label: STRING is
			-- The label used for this report in the configuration file
		once
			Result := "compress-suffix"
		end
	
feature {DUPLICATE_REPORT}
	-- Creation method
	make_debuz_report (a_sync_dir: SYNCHRONISED_DIRECTORY) is
			-- Initialise attributes to valid values
		do
			make_duplicate_report (a_sync_dir)
			m_compress_type := Zip
		end

feature {DUPLICATE_REPORT}
	-- Hidden methods
	set_current_suffix (a_suffix: STRING) is
			-- change m_current_suffix
		do
			m_current_suffix := a_suffix
			if m_current_suffix.has_substring ("bz") then
				m_compress_type := BZip2
			else
				m_compress_type := Zip
			end
		end

end -- class DEBUZ_REPORT
