ocarina-options.ads 4.32 KB
Newer Older
1 2 3 4 5 6 7 8
------------------------------------------------------------------------------
--                                                                          --
--                           OCARINA COMPONENTS                             --
--                                                                          --
--                      O C A R I N A . O P T I O N S                       --
--                                                                          --
--                                 S p e c                                  --
--                                                                          --
jhugues's avatar
jhugues committed
9
--    Copyright (C) 2008-2009 Telecom ParisTech, 2010-2012 ESA & ISAE.      --
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
--                                                                          --
-- Ocarina  is free software;  you  can  redistribute  it and/or  modify    --
-- it under terms of the GNU General Public License as published by the     --
-- Free Software Foundation; either version 2, or (at your option) any      --
-- later version. Ocarina 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 distributed with Ocarina; see file COPYING.   --
-- If not, write to the Free Software Foundation, 51 Franklin Street, Fifth --
-- Floor, Boston, MA 02111-1301, USA.                                       --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable to be   --
-- covered  by the  GNU  General  Public  License. This exception does not  --
-- however invalidate  any other reasons why the executable file might be   --
-- covered by the GNU Public License.                                       --
--                                                                          --
jhugues's avatar
jhugues committed
29 30
--                 Ocarina is maintained by the TASTE project               --
--                      (taste-users@lists.tuxfamily.org)                   --
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
--                                                                          --
------------------------------------------------------------------------------

with Types; use Types;

with GNAT.Table;

package Ocarina.Options is

   type Action_Kind is
     (None,
      Analyze_Model,
      Instantiate_Model,
      Generate_Code,
      Show_Version,
      Show_Help,
      Show_Libraries,
      Show_Usage,
      Parse_Scenario_Files_First,
      Analyze_With_Cheddar,
      Shell);

   Root_System_Name             : Name_Id := No_Name;
   Installation_Directory       : Name_Id := No_Name;
   Output_Filename              : Name_Id := No_Name;
   Boundt_Process               : Name_Id := No_Name;
   Quiet_Mode                   : Boolean := False;
   Verbose_Mode                 : Boolean := False;
   Debug_Mode                   : Boolean := False;
60 61
   Use_Scenario_File            : Boolean := False;
   Auto_Load_AADL_Files         : Boolean := False;
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

   procedure Set_Current_Action (Action : Action_Kind);
   function Get_Current_Action return Action_Kind;
   procedure Reset_Current_Action;

   Invalid_Options : exception;

   function Default_Library_Path return Name_Id;
   --  Return the default AADL property set directory depending on the
   --  current AADL version.

   package Library_Paths is new GNAT.Table (Name_Id, Natural, 1, 5, 20);

   procedure Add_Library_Path (Path : String);
   --  Add a library path in Library_Paths

   type Annex_Action_Kind is (Disable_BA,
                              Disable_REAL,
                              Disable_ALL);

   type Annex_Action is array (Annex_Action_Kind) of Byte;

   procedure Set_Annex_Action (Action : Annex_Action_Kind);
   function Get_Annex_Action (Action : Annex_Action_Kind) return Byte;
   procedure Reset_Annex_Action;
   procedure Process_Annex_Action (Parameters : String);
   function Perform_Annex_Action (Language : Name_Id) return Boolean;

private

   Current_Action : Action_Kind := None;

   Current_Annex_Action : Annex_Action;

end Ocarina.Options;