INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "An arbitrary registry key"
project: "Visual Eiffel Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: registry
class REGISTRY_KEY
inherit

MEMORY
export
{NONE}
all
redefine
copy,
dispose,
is_equal
end

COMPARABLE
redefine
copy,
is_equal
end

WAPI_REGISTRY
export
{NONE}
all
redefine
copy,
is_equal
end
creation {REGISTRY_KEY}

make
feature {NONE}-- Creation

make (root_: like root; parent_: like parent; name_: like name)
-- Dummy creation
feature -- Operations

open
-- Open key with full access
ensure
is_opened: is_opened

open_read
-- Open key with read-only access
ensure
is_opened: is_opened

open_write
-- Open key with write access
ensure
is_opened: is_opened

open_special (desired_access: BIT 32)
-- Open key with the specific access mask.
-- Key operations implicitly open the key every time they called.
-- Explicit opening the key can improve performance when multiple
-- operations are performed.
require
is_closed: not is_opened
ensure
is_opened: is_opened

close
-- Close the open key
require
is_opened: is_opened
ensure
is_closed: not is_opened

flush
-- Flush contents of the open key to disk.
-- Excessive usage of this feature may decrease overall performance.
require
is_opened: is_opened
feature -- Queries

is_opened: BOOLEAN
-- Is key opened?
feature -- Comparison

is_equal (other: like Current): BOOLEAN
-- Is `other' the same key as `Current'?

infix "<" (other: like Current): BOOLEAN
-- Is current object less than 'other' ?
feature -- Duplication

copy (other: like Current)
-- Update current object using fields of object attached
-- to 'other', so as to yield equal objects
feature -- Properties

get_name: STRING
-- Name of the key
ensure
valid_result: Result /= void

get_full_path: STRING
-- Complete hierarchical name of the key
ensure
valid_result: Result /= void

get_parent: like parent
-- Parent key containing the `Current'

get_root: like root
-- Root key of the hierarchy
feature -- Key queries

has_subkey (key_name: STRING): BOOLEAN
-- Does current key's subkey with the specified name exist?
require
correct_key_name: key_name /= void and then not key_name.is_empty

get_subkey (key_name: STRING): REGISTRY_KEY
-- Subkey of the current key
require
correct_key_name: key_name /= void and then not key_name.is_empty and then key_name.item (1) /= path_delimiter

get_all_subkeys: ARRAY [REGISTRY_KEY]
-- All subkeys of the current key
feature -- Key Operations

add_subkey (key_name: STRING): REGISTRY_KEY
-- Add the specified subkey to the current key
require
correct_key_name: key_name /= void and then not key_name.is_empty

remove_subkey (key_name: STRING)
-- Remove the specified subkey from the current key
feature -- Value queries

has_value (value_name: STRING): BOOLEAN
-- Checks whether the key has the specified value.
-- `Void' for `value_name' means default value.

get_value (value_name: STRING): REGISTRY_VALUE
-- Returns the specified key's value
require
correct_value_name: value_name /= void

get_value_to (value: REGISTRY_VALUE)
-- Initializes the specified value
require
correct_value: value /= void

get_all_values: ARRAY [REGISTRY_VALUE]
feature -- Auxiliary value queries

get_default_value: STRING
-- Returns the default key's value

get_string_value (value_name: STRING): STRING
-- Returns key's specified string value

get_integer_value (value_name: STRING): INTEGER
-- Returns key's specified integer value
feature -- Value operations

delete_value (value_name: STRING)

set_value (value: REGISTRY_VALUE)
require
valid_value: value /= void and then value.is_valid

set_default_value (value: STRING)
require
correct_value: value /= void
end -- class REGISTRY_KEY

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES