indexing
	description: "Structure describing a registry key value"
	status: "See notice at end of class"
	date: "$Date$"
	revision: "$Revision$"

class interface
	WEL_REGISTRY_KEY_VALUE

create 

	make (t: like type; v: like value)
			-- Create
		require
			v_not_void: v /= void
		ensure
			type_set: type = t
			value_set: value = v

feature -- Initialization

	make (t: like type; v: like value)
			-- Create
		require
			v_not_void: v /= void
		ensure
			type_set: type = t
			value_set: value = v
	
feature -- Access

	dword_value: INTEGER
			-- Data converted as integer.
		require
			valid_type: type = reg_dword

	Reg_binary: INTEGER is 3
			-- General binary value
			--
			-- Declared in Windows as REG_BINARY
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_dword: INTEGER is 4
			-- Double word value
			--
			-- Declared in Windows as REG_DWORD
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_dword_big_endian: INTEGER is 5
			-- Double word value in big-endian format
			--
			-- Declared in Windows as REG_DWORD_BIG_ENDIAN
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_dword_little_endian: INTEGER is 4
			-- Synonym of Reg_dword
			--
			-- Declared in Windows as REG_DWORD_LITTLE_ENDIAN
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_expand_sz: INTEGER is 2
			-- C-String that contains unexpanded references to environment
			-- variables
			--
			-- Declared in Windows as REG_EXPAND_SZ
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_link: INTEGER is 6
			-- Unicode symbolic link
			--
			-- Declared in Windows as REG_LINK
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_multi_sz: INTEGER is 7
			-- Array of C-strings, terminated by two null characters
			--
			-- Declared in Windows as REG_MULTI_SZ
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_none: INTEGER is 0
			-- No defined value type
			--
			-- Declared in Windows as REG_NONE
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_resource_list: INTEGER is 8
			-- Device-driver resource list
			--
			-- Declared in Windows as REG_RESOURCE_LIST
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	Reg_sz: INTEGER is 1
			-- C-String
			--
			-- Declared in Windows as REG_SZ
			-- (from WEL_REGISTRY_KEY_VALUE_TYPE)

	string_value: STRING
			-- 	Data converted as string.
		require
			valid_type: type = reg_sz

	type: INTEGER
			-- Type of value
			-- See class WEL_REGISTRY_KEY_VALUE_TYPE for possible
			-- values.

	value: STRING
			-- Data.
	
feature -- Element Change

	set_type (t: INTEGER)
			-- Set type of value with t.
			-- See class WEL_REGISTRY_KEY_VALUE_TYPE for possible
			-- values for t.
		ensure
			type_set: type = t

	set_value (v: like value)
			-- Set value with v.
		require
			v_not_void: v /= void
		ensure
			value_set: value = v
	
invariant

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

end -- class WEL_REGISTRY_KEY_VALUE