This package provides access to command line arguments as parsed options.
type Abstract_Option is abstract tagged record
Description : VSS.Strings.Virtual_String;
end record;
procedure Add_Help_Option
Adds builtin definition of the option to display help information. This option is handled automatically.
procedure Add_Option (Option : Abstract_Option'Class)
type Binary_Option is new Named_Option with null record;
function Is_Specified (Option : Abstract_Option'Class) return Boolean
Return True when given option has been specified the command line.
type Name_Value is record
Name : VSS.Strings.Virtual_String;
Value : VSS.Strings.Virtual_String;
end record;
type Name_Value_Option is new Named_Option with record
Name_Name : VSS.Strings.Virtual_String;
Value_Name : VSS.Strings.Virtual_String;
end record;
package Name_Value_Vectors is
new Ada.Containers.Vectors (Positive, Name_Value);
type Named_Option is abstract new Abstract_Option with record
Short_Name : VSS.Strings.Virtual_String;
Long_Name : VSS.Strings.Virtual_String;
end record;
function Positional_Arguments
return VSS.String_Vectors.Virtual_String_Vector
Return list of positional arguments.
type Positional_Option is new Abstract_Option with record
Name : VSS.Strings.Virtual_String;
end record;
procedure Process
Parse command line. If error is found then report it and terminate application.
procedure Report_Error (Message : VSS.String_Vectors.Virtual_String_Vector)
Report error and terminate application.
procedure Report_Error (Message : VSS.Strings.Virtual_String)
Report error and terminate application.
function Value
(Option : Positional_Option'Class) return VSS.Strings.Virtual_String
Return value of the given option.
function Value
(Option : Value_Option'Class) return VSS.Strings.Virtual_String
Return value of the given option.
type Value_Option is new Named_Option with record
Value_Name : VSS.Strings.Virtual_String;
end record;
function Values
(Option : Name_Value_Option'Class) return Name_Value_Vectors.Vector
Return all name=value pairs of the given option specified in the command line.
function Values
(Option : Value_Option'Class)
return VSS.String_Vectors.Virtual_String_Vector
Return all values of the given option specified in the command line.