ocarina-options.ads 4.39 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                                  --
--                                                                          --
yoogx's avatar
yoogx committed
9
--    Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE.      --
10
--                                                                          --
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
-- Ocarina  is free software; you can redistribute it and/or modify under   --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
-- sion. 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.                     --
--                                                                          --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception,   --
-- version 3.1, as published by the Free Software Foundation.               --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
26
--                                                                          --
jhugues's avatar
jhugues committed
27 28
--                 Ocarina is maintained by the TASTE project               --
--                      (taste-users@lists.tuxfamily.org)                   --
29 30 31
--                                                                          --
------------------------------------------------------------------------------

32
with Ocarina.Types; use Ocarina.Types;
33 34 35 36 37

with GNAT.Table;

package Ocarina.Options is

38 39 40 41 42 43 44 45
   Quiet : aliased Boolean;
   Verbose : aliased Boolean;
   --  Note: Display_Help is implicitly defined as part of GNAT.Command_Line
   Display_Version : aliased Boolean;
   Show_Search_Directory : aliased Boolean;
   Auto_Load_AADL_Files   : aliased Boolean := False;
   Debug_Mode             : aliased Boolean := False;

46 47 48 49 50 51 52 53 54 55
   type Action_Kind is
     (None,
      Analyze_Model,
      Instantiate_Model,
      Generate_Code,
      Show_Version,
      Show_Help,
      Show_Libraries,
      Show_Usage,
      Parse_Scenario_Files_First,
yoogx's avatar
yoogx committed
56
      Shell,
yoogx's avatar
yoogx committed
57
      List_Backends,
yoogx's avatar
yoogx committed
58
      Python_Shell);
59

60 61 62
   After_Scenario_Action : Action_Kind := Generate_Code;
   --  Action to be performed _after_ performing scenario activities

63 64 65 66 67 68
   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;
   Use_Scenario_File      : Boolean := False;
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

   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

85
   type Annex_Action_Kind is (Disable_BA, Disable_REAL, Disable_ALL);
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101

   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;