indexing description: "Name value property collection." project: "Project Goanna " library: "preferences" date: "$Date$" revision: "$Revision$" author: "Glenn Maughan " copyright: "Copyright (c) 2002 Glenn Maughan" license: "Eiffel Forum License v1 (see forum.txt)." class GP_SYSTEM_PROPERTIES inherit GP_PROPERTIES export {NONE} load redefine default_create end KL_SHARED_ARGUMENTS export {NONE} all undefine is_equal, copy, default_create end feature -- Initialization default_create is -- Initialise system properties do Precursor {GP_PROPERTIES} load_default_properties load_command_line_properties end feature {NONE} -- Implementation load_default_properties is -- Load standard system properties do end load_command_line_properties is -- Load system properties specified on the command line, -- override any existing properties with the same name. local c: INTEGER next_arg, arg_part, name: STRING split_arg: LIST [STRING] do from c := 1 until c = Arguments.Argument_count loop next_arg := Arguments.argument (c) -- check begins with arg if next_arg.substring_index ("-D", 1) = 1 then arg_part := next_arg.substring (3, next_arg.count) -- check long enough and has equal if arg_part.count >= 3 then split_arg := arg_part.split ('=') split_arg.start name := split_arg.item split_arg.forth force (split_arg.item, name) end end c := c + 1 end end end -- class GP_SYSTEM_PROPERTIES