-- mycomputer is another attempt of A. i. written with Ada.
-- Mycomputer is Copyright (C) 2024 Manuel De Girardi ; 
--
--   This program 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; either version 2 of the License, or
--   (at your option) any later version.
--
--   This program 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 this program; if not, write to the Free Software
--   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
--
-- Date := "2024-03-28 09:06:10"
-- Version := "1.0.0r"
package My.Parameters is
   
   type Parameters_Flags_Enum is
     
     (
      Null_Parameter,
      Config_Filename,
      Help,
      Version
     ) ;
   
   type Parameter_Tagged_Record_Type (Requiered_Parameter : Boolean) is tagged
      record	 
	 Switch   : access Wide_String;	 	 
	 Num_Iter : Natural := 0;	 	 
	 Is_Setted : Boolean := False;	 
	 Parameter_Flag : Parameters_Flags_Enum := Null_Parameter;	 
	 Descr : access Wide_String;	 
	 case Requiered_Parameter is
	    when False =>
	       null;
	    when True =>
	       
	       param : access Wide_String;
	       Value : access Wide_String;
	 end case;
      end record;
      
   type Parameters_Kit_Array_Type is 
     array (Parameters_Flags_Enum'range) of 
     access Parameter_Tagged_Record_Type;

   Line_Parameters : constant Parameters_Kit_Array_Type := 
     
     (Null_parameter => null,
      Config_Filename => new Parameter_Tagged_Record_Type ' 
	(Requiered_Parameter => True, Switch => new Wide_String ' ("F"), Num_Iter => 0,
	 Is_Setted => False, Parameter_Flag => Config_Filename, 
	 Descr => new Wide_String ' ("Configuration filename"),
	 Param => new Wide_String ' ("Wide_String"),
	 Value => null),
	 
      Help => new Parameter_Tagged_Record_Type '
	(Requiered_Parameter => False, Switch => new Wide_String ' ("h"), Num_Iter => 0,
	 Is_Setted => False, Parameter_Flag => help, 
	 Descr => new Wide_String ' ("print this message")),
      
            Version => new Parameter_Tagged_Record_Type '
	(Requiered_Parameter => False, Switch => new Wide_String ' ("v"), Num_Iter => 0,
	 Is_Setted => False, Parameter_Flag => Version, 
	 Descr => new Wide_String ' ("print the version"))
     ) ;


   File_Parameters : constant Parameters_Kit_Array_Type := 
     
     (Null_parameter => null,
      Config_Filename => new Parameter_Tagged_Record_Type ' 
	(Requiered_Parameter => True, Switch => new Wide_String ' ("F"), Num_Iter => 0,
	 Is_Setted => False, Parameter_Flag => Config_Filename, 
	 Descr => new Wide_String ' ("Configuration filename"),
	 Param => new Wide_String ' ("Wide_String"),
	 Value => null),
	 
      Help => new Parameter_Tagged_Record_Type '
	(Requiered_Parameter => False, Switch => new Wide_String ' ("h"), Num_Iter => 0,
	 Is_Setted => False, Parameter_Flag => help, 
	 Descr => new Wide_String ' ("print this message")),
      
      Version => new Parameter_Tagged_Record_Type '
	(Requiered_Parameter => False, Switch => new Wide_String ' ("v"), Num_Iter => 0,
	 Is_Setted => False, Parameter_Flag => Version, 
	 Descr => new Wide_String ' ("print the version"))
     );
   
   
   type Parameters_Kit_Record_Type is tagged
      record
	 All_Parameters : Parameters_Kit_Array_Type;
      end record;

end My.Parameters ;