INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Provides access to command-line arguments"
project: "Visual Eiffel Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: gargs
class ADVANCED_ARGUMENTS
creation

make,
make_from_array,
make_from_string
feature -- Initialization

make
-- Initialize with using the class ARGUMENTS

parse_string (str: STRING): ARRAY [STRING]

make_from_string (input: STRING)
-- Initialize from the characters of 'input'.
-- Note: It parses arguments file if present.
ensure
empty_input: not_empty_array (arguments)

make_from_array (input: ARRAY [STRING])
-- Initialize from the items of 'input'.
-- Note: It parses arguments file if present.
ensure
empty_input: not_empty_array (arguments)
feature -- Control

new_value_delimiters (delimiters: STRING)
-- Set a new 'delimiters' for values parsing in list switches.
require
valid_delimiters: not_empty (delimiters)

wildcards (b: BOOLEAN)
-- Parse WILDCARDS in file names or not.

recursive_find (b: BOOLEAN)
-- Recursive files search (in DIRECTORIES too) or not.

include_directories (b: BOOLEAN)
-- Include DIRECTORIES in files list or not.

file_access (b: BOOLEAN)
-- Check access to the files or not.

case_sensitive (b: BOOLEAN)

reset_last_error_code
-- Reset the last error code.

set_name_with_directory (b: BOOLEAN)
feature -- Status report

has_files: BOOLEAN
-- Does 'input' include 'files' (no any 'switches') ?

has_file_type (file_type: STRING): BOOLEAN
-- Does 'input' include 'files' with type 'file_type' ?
-- ('file_type' is file extension. For example: e, obj, lib atc.)
require
valid_file_type: not_empty (file_type)

has_switches: BOOLEAN
-- Does 'input' include any switches (no 'files') ?

has_simple_switches: BOOLEAN
-- Does 'input' include simple switches
-- like this: /cu, /debug, ... ?

has_list_switches: BOOLEAN
-- Does 'input' include list switches
-- like this: /opt1:value1,value2,... /opt2:value3,value4... ?

has_switch (switch: STRING): BOOLEAN
-- Does 'input' include the any switch with the name 'switch' ?
-- Note: The 'switch' pass without its prefix symbol.
require
valid_switch: not_empty (switch)

has_simple_switch (switch: STRING): BOOLEAN
-- Does 'input' include the simple switch with the name 'switch' ?
-- Note: The 'switch' pass without its prefix symbol.
require
valid_switch: not_empty (switch)

has_list_switch (switch: STRING): BOOLEAN
-- Does 'input' include the list switch with the name 'switch' ?
-- Note: The 'switch' pass without its prefix symbol.
require
valid_switch: not_empty (switch)
feature -- Access

arguments: ARRAY [STRING]

value_delimiters: STRING

files: ARRAY [STRING]
-- Return all 'files' from 'input'; Void if none.

expand_files (arr: ARRAY [STRING]): ARRAY [STRING]

files_type (file_type: STRING): ARRAY [STRING]
-- Return all 'files' from 'input' with the type 'file_type'
-- Void if none.
-- Note: 'file_type' is file extension: e, .C, OBJ, .lib, ...
require
valid_file_type: not_empty (file_type)

simple_switches: ARRAY [STRING]
-- Return all simple switches from 'input'; Void if none.
-- (The simple switches examples: /cu, /debug.)
-- Note: The switches returns without its prefix symbol.

list_switches: ARRAY [STRING]
-- Return all list switches from 'input'; Void if none.
-- (The list switches examples: /opt1:val1,val2,... /opt2:val3,val4...)
-- Note: Switch names returns without its prefix symbol.

list_switch_values (switch: STRING): ARRAY [STRING]
-- Return a list of values for the list switch with the name 'switch'
-- from 'input'
-- Return Void if pass 'switch' is absent in 'input'
-- or if a list of values is absent for this switch.
-- (A list of values is part of list switch which written after symbol ':'.
require
valid_switch: not_empty (switch)
feature -- Validations

not_empty (s: STRING): BOOLEAN
-- Is 's' correct ?

not_empty_array (sa: ARRAY [STRING]): BOOLEAN
-- Is 'sa' correct ?
feature -- Error Handling

last_error_code: INTEGER

INVALID_ARGUMENT: INTEGER

INVALID_SWITCH: INTEGER

INVALID_LIST_SWITCH: INTEGER
feature -- Settings

is_wildcards: BOOLEAN

is_recursive_find: BOOLEAN

is_include_directories: BOOLEAN

is_file_access: BOOLEAN

is_case_sensitive: BOOLEAN

name_with_directory: BOOLEAN
feature -- Constants

assignment_switch_sign: CHARACTER

list_switch_sign: CHARACTER

extension_prefix: CHARACTER

args_file_prefix: CHARACTER

argument_delimiters: STRING
-- The command-line arguments delimiters.

switch_prefixes: STRING
-- The available switch prefixes.

default_value_delimiters: STRING
-- The default delimiters in values list.

blank_STR: STRING
-- It hard to understand, maybe...
-- Used for the code optimization only.

next_non_white_space (s: STRING; start: INTEGER): INTEGER
require
non_void_s: s /= void

white_spaces: STRING
-- Enumerates white spaces which could be used in command line

get_command_line: POINTER
end -- class ADVANCED_ARGUMENTS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES