Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "A command line switch that accepts a value in the form of single character flags." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2021-06-25 04:16:34 -0800 (Fri, 25 Jun 2021) $" revision: "$Revision: 105580 $" class interface ARGUMENT_FLAG_SWITCH create make (a_id: like id; a_desc: like description; a_optional: like optional; a_allow_mutliple: like allow_multiple; a_arg_name: like arg_name; a_arg_desc: like arg_description; a_val_optional: like is_value_optional; a_flags: like flag_descriptions; a_cs_flags: like is_case_sensitive) -- Initialize a new flags option. -- Note: Flags are single characters. This is passed through a_flags, which should be paired with a flag description. -- -- Note: To use long and short names set name a_id := "s|long" require a_id_attached: a_id /= Void not_a_id_is_empty: not a_id.is_empty a_id_is_valid_id: is_valid_id (a_id) a_desc_attached: a_desc /= Void not_a_desc_is_empty: not a_desc.is_empty a_arg_name_attached: a_arg_name /= Void not_a_arg_name_is_empty: not a_arg_name.is_empty a_arg_desc_attached: a_arg_desc /= Void not_a_arg_desc_is_empty: not a_arg_desc.is_empty not_a_flags_is_empty: not a_flags.is_empty a_flags_contains_attached_items: c: a_flags ¦ not c.is_empty a_flags_contains_printable_items: c: a_flags.current_keys ¦ c.is_printable ensure id_set: id ~ a_id description_set: description ~ a_desc optional: optional = a_optional arg_name_set: arg_name ~ a_arg_name is_value_optional_set: is_value_optional = a_val_optional allow_multiple_set: allow_multiple = a_allow_mutliple flag_descriptions_set: flag_descriptions ~ a_flags is_case_sensitive_flags_set: is_case_sensitive = a_cs_flags not_is_hidden: not is_hidden make_hidden (a_id: like id; a_optional: like optional; a_allow_mutliple: like allow_multiple; a_arg_name: like arg_name; a_val_optional: like is_value_optional; a_flags: like flag_descriptions; a_cs_flags: like is_case_sensitive) -- Initialize a new value option. -- Note: Flags are single characters. This is passed through a_flags, which should be paired with a flag description. -- -- Note: To use long and short names set name a_id := "s|long" require a_id_attached: a_id /= Void not_a_id_is_empty: not a_id.is_empty a_id_is_valid_id: is_valid_id (a_id) a_arg_name_attached: a_arg_name /= Void not_a_arg_name_is_empty: not a_arg_name.is_empty not_a_flags_is_empty: not a_flags.is_empty a_flags_contains_attached_items: c: a_flags ¦ not c.is_empty a_flags_contains_printable_items: c: a_flags.current_keys ¦ c.is_printable ensure id_set: id ~ a_id optional: optional = a_optional arg_name_set: arg_name ~ a_arg_name is_value_optional_set: is_value_optional ~ a_val_optional allow_multiple_set: allow_multiple = a_allow_mutliple flag_descriptions_set: flag_descriptions ~ a_flags is_case_sensitive_flags_set: is_case_sensitive = a_cs_flags is_hidden: is_hidden feature -- Access arg_description: STRING_8 -- Value argument description. -- (from ARGUMENT_VALUE_SWITCH) arg_name: STRING_8 -- Value argument description name. -- (from ARGUMENT_VALUE_SWITCH) description: STRING_8 -- Option description -- (from ARGUMENT_SWITCH) flag_descriptions: HASH_TABLE [STRING_8, CHARACTER_8] -- Table of flags matched with a description. flags: LIST [CHARACTER_8] -- List of flags applicable to switch. ensure result_attached: Result /= Void result_consistent: Result ~ flags not_result_is_empty: not Result.is_empty result_contains_printable_characters: Result.for_all (agent (ia_item: CHARACTER_8): BOOLEAN ) generating_type: TYPE [detachable ARGUMENT_FLAG_SWITCH] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty hash_code: INTEGER_32 -- Hash code value -- (from ARGUMENT_SWITCH) ensure -- from HASHABLE good_hash_value: Result >= 0 id: STRING_8 -- Switch identifier -- (from ARGUMENT_SWITCH) long_name: READABLE_STRING_8 -- Option long name -- (from ARGUMENT_SWITCH) lower_case_id: STRING_8 -- Lower-case version of the switch identifier -- (from ARGUMENT_SWITCH) name: READABLE_STRING_8 -- Priority option name -- (from ARGUMENT_SWITCH) ensure -- from ARGUMENT_SWITCH result_attached: Result /= Void not_result_is_empty: not Result.is_empty short_name: CHARACTER_8 -- Option short name, or '%U' if no short name is used. -- (from ARGUMENT_SWITCH) feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: ARGUMENT_FLAG_SWITCH): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: ARGUMENT_FLAG_SWITCH): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "" (other: ARGUMENT_FLAG_SWITCH): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void is_case_sensitive: BOOLEAN -- Indicates if flags are case-sensitive is_hashable: BOOLEAN -- May current object be hashed? -- (True by default.) -- (from HASHABLE) same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) feature -- Duplication copy (other: ARGUMENT_FLAG_SWITCH) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: ARGUMENT_FLAG_SWITCH) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: ARGUMENT_FLAG_SWITCH -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: ARGUMENT_FLAG_SWITCH) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: ARGUMENT_FLAG_SWITCH -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: ARGUMENT_FLAG_SWITCH -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: detachable ARGUMENT_FLAG_SWITCH -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void feature -- Query is_valid_id (a_id: READABLE_STRING_8): BOOLEAN -- Determines if switch ID is a valid identifier. -- -- a_id: The switch identifier to validate. -- Result: True if the switch identifier is valid; False otherwise. -- (from ARGUMENT_SWITCH) require -- from ARGUMENT_SWITCH a_id_attached: a_id /= Void not_a_id_is_empty: not a_id.is_empty feature -- Status Report allow_multiple: BOOLEAN -- Indicated if mutiple occurrences permitted. -- (from ARGUMENT_SWITCH) frozen has_short_name: BOOLEAN -- Indicates if a short name has been specified. -- (from ARGUMENT_SWITCH) is_hidden: BOOLEAN -- Indicate if switch should be hidden. -- (from ARGUMENT_SWITCH) is_special: BOOLEAN -- Indicates if switch is to be treated with "special" care by the argument validator. -- (from ARGUMENT_SWITCH) is_value_optional: BOOLEAN -- Indicates if a option value is optional -- (from ARGUMENT_VALUE_SWITCH) optional: BOOLEAN -- Indicates if switch is optional. -- (from ARGUMENT_SWITCH) invariant flag_descriptions_attached: flag_descriptions /= Void not_flag_description_is_empty: not flag_descriptions.is_empty flag_descriptions_contains_attached_items: flag_descriptions.linear_representation.for_all (agent (ia_item: STRING_8): BOOLEAN ) flag_descriptions_contains_printable_items: flag_descriptions.current_keys.for_all (agent (ia_item: CHARACTER_8): BOOLEAN ) -- from ARGUMENT_VALUE_SWITCH arg_name_attached: arg_name /= Void not_arg_name_is_empty: not arg_name.is_empty arg_description_attached: arg_description /= Void not_arg_description_is_empty: not arg_description.is_empty -- from ARGUMENT_SWITCH id_attached: id /= Void not_id_is_empty: not id.is_empty id_is_valid_id: is_valid_id (id) lower_case_id_attached: lower_case_id /= Void long_name_attached: long_name /= Void not_long_name_is_empty: not long_name.is_empty description_attached: description /= Void not_description_is_empty: not description.is_empty -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note ca_ignore: "CA011", "CA011: too many arguments" copyright: "Copyright (c) 1984-2021, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" licensing_options: "http://www.eiffel.com/licensing" copying: "[ This file is part of Eiffel Software's Eiffel Development Environment. Eiffel Software's Eiffel Development Environment is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License (available at the URL listed under "license" above). Eiffel Software's Eiffel Development Environment is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Eiffel Software's Eiffel Development Environment; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ]" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class ARGUMENT_FLAG_SWITCH
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org